Example #1
0
    def __call__(module=None,
                 verbose=False,
                 nocapture=False,
                 pdb=False,
                 stop=False):
        if not module:
            from pkg_resources import iter_entry_points
            module = ['datalad']
            module.extend(ep.module_name
                          for ep in iter_entry_points('datalad.tests'))
        module = ensure_list(module)
        lgr.info('Starting test run for module(s): %s', module)

        # Exception (traceback) logging is disabled by default. However, as of
        # now we do test logging output in (too) great detail. Therefore enable
        # it here, so `datalad-test` doesn't fail by default.
        # Can be removed whenever the tests don't require it.
        from datalad import cfg as dlcfg
        from datalad.tests.utils import patch
        try:
            with patch.dict('os.environ', {'DATALAD_LOG_EXC': '1'}):
                dlcfg.reload()
                for mod in module:
                    datalad.test(module=mod,
                                 verbose=verbose,
                                 nocapture=nocapture,
                                 pdb=pdb,
                                 stop=stop)
        finally:
            dlcfg.reload()
Example #2
0
 def __call__(module=None, verbose=False, nocapture=False, pdb=False, stop=False):
     if not module:
         from pkg_resources import iter_entry_points
         module = ['datalad']
         module.extend(ep.module_name for ep in iter_entry_points('datalad.tests'))
     module = assure_list(module)
     lgr.info('Starting test run for module(s): %s', module)
     for mod in module:
         datalad.test(module=mod, verbose=verbose, nocapture=nocapture, pdb=pdb, stop=stop)
Example #3
0
 def __call__(module='datalad',
              verbose=False,
              nocapture=False,
              pdb=False,
              stop=False):
     datalad.test(module=module,
                  verbose=verbose,
                  nocapture=nocapture,
                  pdb=pdb,
                  stop=stop)
Example #4
0
def test_test():
    try:
        import numpy
        assert Version(numpy.__version__) >= Version('1.2')
    except:
        raise SkipTest("Need numpy 1.2")

    # we need to avoid running global teardown
    with patch.dict('os.environ', {'DATALAD_TESTS_NOTEARDOWN': '1'}):
        # we can't swallow outputs due to all the nosetests dances etc
        datalad.test('datalad.support.tests.test_status', verbose=0)
Example #5
0
def run(args):
    import datalad
    datalad.test()
Example #6
0
def run(args):
    import datalad
    datalad.test()
Example #7
0
 def __call__():
     datalad.test()
Example #8
0
 def __call__():
     datalad.test()
Example #9
0
 def __call__(self):
     datalad.test()