Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.7: test failure #93

Closed
0-wiz-0 opened this issue Jan 31, 2022 · 5 comments
Closed

0.7: test failure #93

0-wiz-0 opened this issue Jan 31, 2022 · 5 comments

Comments

@0-wiz-0
Copy link

0-wiz-0 commented Jan 31, 2022

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 trys to import hypothesmith, but this is not installed on my system, and it has an except clause just ignoring the problem.

@alerque
Copy link

alerque commented Feb 22, 2022

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.)

@mweinelt
Copy link

We're seeing the same problem on NixOS just now.

@mtelka
Copy link

mtelka commented Nov 18, 2022

Proposed fix: #92

@asottile
Copy link
Member

asottile commented Dec 3, 2023

see #92

@asottile asottile closed this as completed Dec 3, 2023
@mweinelt
Copy link

mweinelt commented Dec 3, 2023

see #93

This is #93.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants