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