Python nose.main() Examples
The following are 28
code examples of nose.main().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
nose
, or try the search function
.
Example #1
Source File: run_nosetests.py From scuba with MIT License | 6 votes |
def main(): args, otherargs = parse_args() if args.no_local_import: # Remove the current directory from the import path exclude_sys_path('.') remove_f('.coverage') nose.main( argv = [ 'nosetests', '-v', '--with-coverage', '--cover-inclusive', '--cover-package=scuba', '--detailed-errors', '--process-timeout=60', ] + otherargs, )
Example #2
Source File: runner.py From pyRevit with GNU General Public License v3.0 | 5 votes |
def setup_py_test(): """Runner to use for the 'test_suite' entry of your setup.py. Prevents any name clash shenanigans from the command line argument "test" that the "setup.py test" command sends to nose. """ nose.main(addplugins=[NoseSQLAlchemy()], argv=['runner'])
Example #3
Source File: lowlevel_tests.py From fiss with BSD 3-Clause "New" or "Revised" License | 5 votes |
def main(): nose.main()
Example #4
Source File: highlevel_tests.py From fiss with BSD 3-Clause "New" or "Revised" License | 5 votes |
def main(): nose.main()
Example #5
Source File: runner.py From android_universal with MIT License | 5 votes |
def setup_py_test(): """Runner to use for the 'test_suite' entry of your setup.py. Prevents any name clash shenanigans from the command line argument "test" that the "setup.py test" command sends to nose. """ nose.main(addplugins=[NoseSQLAlchemy()], argv=['runner'])
Example #6
Source File: runner.py From android_universal with MIT License | 5 votes |
def main(): nose.main(addplugins=[NoseSQLAlchemy()])
Example #7
Source File: runner.py From android_universal with MIT License | 5 votes |
def setup_py_test(): """Runner to use for the 'test_suite' entry of your setup.py. Prevents any name clash shenanigans from the command line argument "test" that the "setup.py test" command sends to nose. """ nose.main(addplugins=[NoseSQLAlchemy()], argv=['runner'])
Example #8
Source File: runner.py From android_universal with MIT License | 5 votes |
def main(): nose.main(addplugins=[NoseSQLAlchemy()])
Example #9
Source File: runner.py From moviegrabber with GNU General Public License v3.0 | 5 votes |
def setup_py_test(): """Runner to use for the 'test_suite' entry of your setup.py. Prevents any name clash shenanigans from the command line argument "test" that the "setup.py test" command sends to nose. """ nose.main(addplugins=[NoseSQLAlchemy()], argv=['runner'])
Example #10
Source File: runner.py From moviegrabber with GNU General Public License v3.0 | 5 votes |
def main(): nose.main(addplugins=[NoseSQLAlchemy()])
Example #11
Source File: __init__.py From build-relengapi with Mozilla Public License 2.0 | 5 votes |
def run(self, parser, args): import nose sys.argv = [sys.argv[0]] + args.nose_args if 'RELENGAPI_SETTINGS' in os.environ: del os.environ['RELENGAPI_SETTINGS'] # enable sqlalchemy logging logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO) # push a fake app context to avoid tests accidentally using the # runtime app context (for example, the development DB) with Flask(__name__).app_context(): nose.main(addplugins=[ResetLogging()])
Example #12
Source File: runner.py From jarvis with GNU General Public License v2.0 | 5 votes |
def setup_py_test(): """Runner to use for the 'test_suite' entry of your setup.py. Prevents any name clash shenanigans from the command line argument "test" that the "setup.py test" command sends to nose. """ nose.main(addplugins=[NoseSQLAlchemy()], argv=['runner'])
Example #13
Source File: runner.py From jarvis with GNU General Public License v2.0 | 5 votes |
def main(): nose.main(addplugins=[NoseSQLAlchemy()])
Example #14
Source File: runner.py From stdm with GNU General Public License v2.0 | 5 votes |
def setup_py_test(): """Runner to use for the 'test_suite' entry of your setup.py. Prevents any name clash shenanigans from the command line argument "tests" that the "setup.py tests" command sends to nose. """ nose.main(addplugins=[NoseSQLAlchemy()], argv=['runner'])
Example #15
Source File: runner.py From stdm with GNU General Public License v2.0 | 5 votes |
def main(): nose.main(addplugins=[NoseSQLAlchemy()])
Example #16
Source File: runner.py From jbox with MIT License | 5 votes |
def main(): nose.main(addplugins=[NoseSQLAlchemy()])
Example #17
Source File: runner.py From pyRevit with GNU General Public License v3.0 | 5 votes |
def main(): nose.main(addplugins=[NoseSQLAlchemy()])
Example #18
Source File: runner.py From planespotter with MIT License | 5 votes |
def setup_py_test(): """Runner to use for the 'test_suite' entry of your setup.py. Prevents any name clash shenanigans from the command line argument "test" that the "setup.py test" command sends to nose. """ nose.main(addplugins=[NoseSQLAlchemy()], argv=['runner'])
Example #19
Source File: runner.py From planespotter with MIT License | 5 votes |
def main(): nose.main(addplugins=[NoseSQLAlchemy()])
Example #20
Source File: runner.py From Fluid-Designer with GNU General Public License v3.0 | 5 votes |
def setup_py_test(): """Runner to use for the 'test_suite' entry of your setup.py. Prevents any name clash shenanigans from the command line argument "test" that the "setup.py test" command sends to nose. """ nose.main(addplugins=[NoseSQLAlchemy()], argv=['runner'])
Example #21
Source File: runner.py From Fluid-Designer with GNU General Public License v3.0 | 5 votes |
def main(): nose.main(addplugins=[NoseSQLAlchemy()])
Example #22
Source File: tests.py From emva1288 with GNU General Public License v3.0 | 5 votes |
def run(): os.environ["NOSE_WITH_COVERAGE"] = "1" os.environ['NOSE_COVER_PACKAGE'] = 'emva1288' os.environ["NOSE_COVER_HTML"] = "1" os.environ["NOSE_COVER_ERASE"] = "1" nose.main(defaultTest=default_test_modules)
Example #23
Source File: setup.py From celery-pubsub with MIT License | 5 votes |
def run_tests(self): import nose sys.exit(nose.main(argv=self.argv))
Example #24
Source File: scripts.py From AnyBlok with Mozilla Public License 2.0 | 5 votes |
def anyblok_nose(): """Run nose unit test after giving it the registry """ warnings.simplefilter('default') warnings.warn( "This script is deprecated and will be removed soon. " "The Nose test machinery has been removed from the framework in order " "to be replaced with Pytest. " "If you need to run your tests with nose, install the Nose package.", DeprecationWarning, stacklevel=2) try: from nose import main except ImportError: logger.error('"Nosetest" is not installed, try: pip install nose') registry = anyblok.start('nose', useseparator=True, unittest=True) if registry: installed_bloks = registry.System.Blok.list_by_state("installed") selected_bloks = return_list( Configuration.get('selected_bloks')) or installed_bloks unwanted_bloks = return_list( Configuration.get('unwanted_bloks')) or [] unwanted_bloks.extend(['anyblok-core', 'anyblok-test', 'model_authz']) defaultTest = [] for blok in installed_bloks: if blok not in selected_bloks or blok in unwanted_bloks: continue startpath = BlokManager.getPath(blok) for root, dirs, _ in walk(startpath): if 'tests' in dirs: defaultTest.append(join(root, 'tests')) registry.close() # free the registry to force create it again sys.exit(main(defaultTest=defaultTest))
Example #25
Source File: runtests.py From django-connections with MIT License | 5 votes |
def main(): environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' # setup path test_dir = dirname(dirname(abspath(__file__))) sys.path.insert(0, test_dir) try: # django >= 1.7 from django import setup except ImportError: pass else: setup() # setup test env from django.test.utils import setup_test_environment setup_test_environment() # setup db from django.core.management import call_command, CommandError options = { 'interactive': False, 'verbosity': 1, } try: call_command('migrate', **options) except CommandError: # Django < 1.7 call_command('syncdb', **options) # run tests return nose.main()
Example #26
Source File: runner.py From jbox with MIT License | 5 votes |
def setup_py_test(): """Runner to use for the 'test_suite' entry of your setup.py. Prevents any name clash shenanigans from the command line argument "test" that the "setup.py test" command sends to nose. """ nose.main(addplugins=[NoseSQLAlchemy()], argv=['runner'])
Example #27
Source File: runner.py From jbox with MIT License | 5 votes |
def main(): nose.main(addplugins=[NoseSQLAlchemy()])
Example #28
Source File: runner.py From jbox with MIT License | 5 votes |
def setup_py_test(): """Runner to use for the 'test_suite' entry of your setup.py. Prevents any name clash shenanigans from the command line argument "test" that the "setup.py test" command sends to nose. """ nose.main(addplugins=[NoseSQLAlchemy()], argv=['runner'])