[case testDundersNotImplemented] # This case is special because it tests the behavior of NotImplemented # used in a typed function which return type is bool. # This is a convention that can be overridden by the user. class UsesNotImplemented: def __eq__(self, b: object) -> bool: return NotImplemented def test_not_implemented() -> None: assert UsesNotImplemented() != object() x = UsesNotImplemented() == object() assert not x