summaryrefslogtreecommitdiff
path: root/dev-python/mccabe/files
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-04 16:24:49 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-04 16:24:49 -0500
commita3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7 (patch)
tree0c52bbae1c242fbc296bd650fcd1167685f81492 /dev-python/mccabe/files
parentbfd9c39e4712ebdb442d4ca0673061faed1e70e1 (diff)
downloadbaldeagleos-repo-a3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7.tar.gz
baldeagleos-repo-a3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7.tar.xz
baldeagleos-repo-a3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7.zip
Adding metadata
Diffstat (limited to 'dev-python/mccabe/files')
-rw-r--r--dev-python/mccabe/files/mccabe-0.7.0-fix-tests-without-hypothesmith.patch74
1 files changed, 0 insertions, 74 deletions
diff --git a/dev-python/mccabe/files/mccabe-0.7.0-fix-tests-without-hypothesmith.patch b/dev-python/mccabe/files/mccabe-0.7.0-fix-tests-without-hypothesmith.patch
deleted file mode 100644
index 18728fe59826..000000000000
--- a/dev-python/mccabe/files/mccabe-0.7.0-fix-tests-without-hypothesmith.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-diff --git a/test_mccabe.py b/test_mccabe.py
-index fe6e8d3..14d8012 100644
---- a/test_mccabe.py
-+++ b/test_mccabe.py
-@@ -241,37 +241,38 @@ class RegressionTests(unittest.TestCase):
-
- # 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
--) -> None:
-- """Property-based tests for mccabe.
--
-- This test case is based on a similar test for Black, the code formatter.
-- Black's test was written by Zac Hatfield-Dodds, the author of Hypothesis
-- and the Hypothesmith tool for source code generation. You can run this
-- file with `python`, `pytest`, or (soon) a coverage-guided fuzzer Zac is
-- working on.
-- """
--
-- # Before starting, let's confirm that the input string is valid Python:
-- compile(src_contents, "<string>", "exec") # else bug is in hypothesmith
--
-- # Then try to apply get_complexity_number to the code...
-- get_code_complexity(src_contents, max_complexity)
-+if hypothesmith:
-+ @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
-+ ) -> None:
-+ """Property-based tests for mccabe.
-+
-+ This test case is based on a similar test for Black, the code formatter.
-+ Black's test was written by Zac Hatfield-Dodds, the author of Hypothesis
-+ and the Hypothesmith tool for source code generation. You can run this
-+ file with `python`, `pytest`, or (soon) a coverage-guided fuzzer Zac is
-+ working on.
-+ """
-+
-+ # Before starting, let's confirm that the input string is valid Python:
-+ compile(src_contents, "<string>", "exec") # else bug is in hypothesmith
-+
-+ # Then try to apply get_complexity_number to the code...
-+ get_code_complexity(src_contents, max_complexity)
-
-
- if __name__ == "__main__":