2014-10-31 07:02:12 +00:00
|
|
|
import nose
|
|
|
|
from nose.plugins.base import Plugin
|
|
|
|
|
2014-10-31 07:03:40 +00:00
|
|
|
|
2014-10-31 07:02:12 +00:00
|
|
|
class ExtensionPlugin(Plugin):
|
|
|
|
|
|
|
|
name = "ExtensionPlugin"
|
|
|
|
|
|
|
|
def options(self, parser, env):
|
2014-10-31 07:03:40 +00:00
|
|
|
Plugin.options(self, parser, env)
|
2014-10-31 07:02:12 +00:00
|
|
|
|
|
|
|
def configure(self, options, config):
|
|
|
|
Plugin.configure(self, options, config)
|
|
|
|
self.enabled = True
|
|
|
|
|
|
|
|
def wantFile(self, file):
|
|
|
|
return file.endswith('.py')
|
|
|
|
|
2014-10-31 07:03:40 +00:00
|
|
|
def wantDirectory(self, directory):
|
2014-10-31 07:02:12 +00:00
|
|
|
return True
|
|
|
|
|
2014-10-31 07:03:40 +00:00
|
|
|
def wantModule(self, file):
|
2014-10-31 07:02:12 +00:00
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2014-10-31 07:03:40 +00:00
|
|
|
nose.main(addplugins=[ExtensionPlugin()])
|