upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tests/test_cfg_structure.py
diff options
context:
space:
mode:
authorbobcatchris <83428450+bobcatchris@users.noreply.github.com>2026-11-22 00:04:22 -0600
committerbobcatchris <83428450+bobcatchris@users.noreply.github.com>2026-11-22 00:04:22 -0600
commit40f01a9cf4b7db93c0d17ecbbe7530c6c79f5f86 (patch)
tree23e0249503f0a38167a096e73c91ca5411edcd24 /tests/test_cfg_structure.py
parent43d470316ec6cbcd64002bc3792998d9f5745dac (diff)
test_cfg_structure: end the random-graph test on its assertions
test_random_graphs returned the five counters it had already asserted two lines above, so pytest reported the file's only warning: PytestReturnNotNoneWarning: Expected None, but ... returned (18228, 1772, 12692, 1755, 17). tests/requirements.txt pins pytest 9.2.0, which still warns but says the warning becomes an error in a future release, so the file would turn the translator-tests job red without anyone touching it. Drop the return. Under both pytest 8.3.5 (local) and the pinned 9.2.0 (clean venv) the file passes 2/2 with no warnings. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Diffstat (limited to 'tests/test_cfg_structure.py')
-rw-r--r--tests/test_cfg_structure.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_cfg_structure.py b/tests/test_cfg_structure.py
index 1e4d748be..0b74b0bfd 100644
--- a/tests/test_cfg_structure.py
+++ b/tests/test_cfg_structure.py
@@ -133,7 +133,7 @@ def test_random_graphs():
133 assert got == want, f"graph {succ} seed {seed}: tree ran {got}, graph runs {want}" 133 assert got == want, f"graph {succ} seed {seed}: tree ran {got}, graph runs {want}"
134 assert structured > 5000 and refused > 1000 and loops > 2000, (structured, refused, loops) 134 assert structured > 5000 and refused > 1000 and loops > 2000, (structured, refused, loops)
135 assert split_ok > 1000 and split_ok + split_cap == refused, (split_ok, split_cap, refused) 135 assert split_ok > 1000 and split_ok + split_cap == refused, (split_ok, split_cap, refused)
136 return structured, refused, loops, split_ok, split_cap 136 # No return: pytest requires a test to end on None, and the counts above are already asserted.
137 137
138 138
139def test_shapes(): 139def test_shapes():