Skip to content

hypothesis-less environment test skip not working #114

Description

@apteryks

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions