MCPcopy Index your code
hub / github.com/RustPython/RustPython / f

Method f

Lib/test/test_patma.py:2071–2078  ·  view source on GitHub ↗
(color)

Source from the content-addressed store, hash-verified

2069 GREEN = 1
2070 BLUE = 2
2071 def f(color):
2072 match color:
2073 case Color.RED:
2074 return "I see red!"
2075 case Color.GREEN:
2076 return "Grass is green"
2077 case Color.BLUE:
2078 return "I'm feeling the blues :("
2079 self.assertEqual(f(Color.RED), "I see red!")
2080 self.assertEqual(f(Color.GREEN), "Grass is green")
2081 self.assertEqual(f(Color.BLUE), "I'm feeling the blues :(")

Callers 1

test_patma_249Method · 0.45

Calls 2

localsFunction · 0.85
PointClass · 0.70

Tested by

no test coverage detected