ugh how do I tell codecov that a python match/case statement is exhaustive without a default case

you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 1 day ago

@glyph heh, I was just thinking that, yes coverage tool will complain about that. there's no way to test a line whose only purpose is to fail hard because it should not be reachable. options include annotating it for the coverage tester or.. ugh.. somehow injecting a test case to trigger it which..is ugly. yeah. sorry.this should be part of the language, I think. "unreachable_default:"

  • source
  • parent