summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_arcs.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_arcs.py b/tests/test_arcs.py
index d907e8c7..1f2e50d7 100644
--- a/tests/test_arcs.py
+++ b/tests/test_arcs.py
@@ -1362,6 +1362,19 @@ class MatchCaseTest(CoverageTest):
)
assert self.stdout() == "None\nno go\ngo: n\n"
+ def test_absurd_wildcard(self):
+ # https://github.com/nedbat/coveragepy/issues/1421
+ self.check_coverage("""\
+ def absurd(x):
+ match x:
+ case (3 | 99 | (999 | _)):
+ print("default")
+ absurd(5)
+ """,
+ arcz=".1 15 5. .2 23 34 4.",
+ )
+ assert self.stdout() == "default\n"
+
class OptimizedIfTest(CoverageTest):
"""Tests of if statements being optimized away."""