nose icon indicating copy to clipboard operation
nose copied to clipboard

Tests not running in namespace package. Cf. #856

Open aisthesis opened this issue 7 years ago • 0 comments

I'm having an issue similar to what is referenced in #856. I'm using nose 1.3.7 and Python 3.6.

The package I'm testing is a namespace package, but the test directory only uses empty __init__.py files. Here's the output when I try to run tests from my tst directory:

nose.config: INFO: Ignoring files matching ['^\.', '^_', '^setup\.py$'] Failure: RuntimeError ('path' must be None or a list, not <class '_frozen_importlib_external._NamespacePath'>) ... ERROR

====================================================================== ERROR: Failure: RuntimeError ('path' must be None or a list, not <class '_frozen_importlib_external._NamespacePath'>)

Traceback (most recent call last): File "/Users/marshallfarrier/venv/squt_tst/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest raise self.exc_val.with_traceback(self.tb) File "/Users/marshallfarrier/venv/squt_tst/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName addr.filename, addr.module) File "/Users/marshallfarrier/venv/squt_tst/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "/Users/marshallfarrier/venv/squt_tst/lib/python3.6/site-packages/nose/importer.py", line 79, in importFromDir fh, filename, desc = find_module(part, path) File "/Users/marshallfarrier/venv/squt_tst/lib/python3.6/imp.py", line 270, in find_module "not {}".format(type(path))) RuntimeError: 'path' must be None or a list, not <class '_frozen_importlib_external._NamespacePath'>


Ran 1 test in 0.002s

FAILED (errors=1)

aisthesis avatar Jul 06 '17 07:07 aisthesis