MCPcopy
hub / github.com/pex-tool/pex / test_basics

Function test_basics

tests/test_enum.py:32–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30
31
32def test_basics():
33 # type: () -> None
34
35 assert Color.RED is Color.for_value("red")
36 assert Color.RED == Color.for_value("red")
37
38 assert Color.GREEN is not Enum.Value("green")
39 assert Color.GREEN != Enum.Value("green")
40
41 assert Color.BLUE is not Color.Value("blue")
42 assert Color.BLUE != Color.Value("blue")
43
44 assert Color.for_value("red") is not Color.for_value("green") is not Color.for_value("blue")
45 assert Color.for_value("red") != Color.for_value("green") != Color.for_value("blue")
46
47 with pytest.raises(ValueError):
48 Color.for_value("yellow")
49
50
51def test_value():

Callers

nothing calls this directly

Calls 1

for_valueMethod · 0.45

Tested by

no test coverage detected