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
[–] [S] 1 point 1 day ago (1 child)

@tekhedd the trouble is that eventually my type checker is going to fight with my coverage checker about this

  • source
  • parent
  • hideshow 1 child comment
  • [–] 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