Is it possible to check whether all of the values of an Enum have been used? For example, given the following code:
from enum import Enum
class Prefix(Enum):
FORMAL = "Hello"
INFORMAL = "Hi"
def hello(name):
return f"{Prefix.FORMAL.value}, {name}!"
def test_hello_with_sample_name() -> None:
assert hello("Alice") == "Hello, Alice!"
Is it possible to configure Python's coverage module (or some other test runner) to report that line 6, INFORMAL = "Hi", is unused?