diff --git a/test_mccabe.py b/test_mccabe.py index fe6e8d3..fb4c2e9 100644 --- a/test_mccabe.py +++ b/test_mccabe.py @@ -239,21 +239,6 @@ class RegressionTests(unittest.TestCase): self.assertEqual(0, mccabe.get_module_complexity("mccabe.py")) -# This test uses the Hypothesis and Hypothesmith libraries to generate random -# syntatically-valid Python source code and applies McCabe on it. -@settings( - max_examples=1000, # roughly 1k tests/minute, or half that under coverage - derandomize=False, # deterministic mode to avoid CI flakiness - deadline=None, # ignore Hypothesis' health checks; we already know that - suppress_health_check=HealthCheck.all(), # this is slow and filter-heavy. -) -@given( - # Note that while Hypothesmith might generate code unlike that written by - # humans, it's a general test that should pass for any *valid* source code. - # (so e.g. running it against code scraped of the internet might also help) - src_contents=hypothesmith.from_grammar() | hypothesmith.from_node(), - max_complexity=st.integers(min_value=1), -) @pytest.mark.skipif(not hypothesmith, reason="hypothesmith could not be imported") def test_idempotent_any_syntatically_valid_python( src_contents: str, max_complexity: int