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

hypothesis-less environment test skip not working #114

Open
Apteryks opened this issue Nov 29, 2024 · 1 comment
Open

hypothesis-less environment test skip not working #114

Apteryks opened this issue Nov 29, 2024 · 1 comment

Comments

@Apteryks
Copy link

Hi,

When hypothesis is not available, the @settings decorators throws an error in the test before the test gets to be skipped, e.g.:

======================================================================
ERROR: test_mccabe (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_mccabe
Traceback (most recent call last):
  File "/gnu/store/lp8ch4rn10whzyajnzv216d2a2v163c7-python-3.10.7/lib/python3.10/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/gnu/store/lp8ch4rn10whzyajnzv216d2a2v163c7-python-3.10.7/lib/python3.10/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/tmp/guix-build-python-mccabe-0.7.0.drv-0/mccabe-0.7.0/test_mccabe.py", line 244, in <module>
    @settings(
NameError: name 'settings' is not defined
@Romain-Geissler-1A
Copy link

It seems maintainers of this libraries have had this remark couple of times already. For example in #92. For me the test should really be made ok if the dependency is missing, or the error less misleading in case it isn't there, as it seems this issue hits users from time to tome.

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

2 participants