mccabe
mccabe copied to clipboard
0.7: test failure
When running the self tests on the pypi sdist file, I see:
# setup.py test
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
running egg_info
writing manifest file 'mccabe.egg-info/SOURCES.txt'
running build_ext
test_mccabe (unittest.loader._FailedTest) ... ERROR
======================================================================
ERROR: test_mccabe (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_mccabe
Traceback (most recent call last):
File "/usr/pkg/lib/python3.10/unittest/loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/pkg/lib/python3.10/unittest/loader.py", line 377, in _get_module_from_name
__import__(name)
File "/scratch/devel/py-mccabe/work/mccabe-0.7.0/test_mccabe.py", line 244, in <module>
@settings(
NameError: name 'settings' is not defined
----------------------------------------------------------------------
Ran 1 test in 0.000s
I see that it try
s to import hypothesmith, but this is not installed on my system, and it has an except
clause just ignoring the problem.
It looks like the problem is that while there is a check for whether or not hyphothesmith is available, later in the test file it blindly assumes it is.
(Also ran into this trying to package for Arch Linux.)
We're seeing the same problem on NixOS just now.
Proposed fix: #92
see #92
see #93
This is #93.