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

Method test_patma_197

Lib/test/test_patma.py:2053–2064  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2051 self.assertEqual(y, 0)
2052
2053 def test_patma_197(self):
2054 w = [Point(-1, 0), Point(1, 2)]
2055 match w:
2056 case (Point(x1, y1), Point(x2, y2) as p2):
2057 z = 0
2058 self.assertEqual(w, [Point(-1, 0), Point(1, 2)])
2059 self.assertIs(x1, w[0].x)
2060 self.assertIs(y1, w[0].y)
2061 self.assertIs(p2, w[1])
2062 self.assertIs(x2, w[1].x)
2063 self.assertIs(y2, w[1].y)
2064 self.assertIs(z, 0)
2065
2066 def test_patma_198(self):
2067 class Color(enum.Enum):

Callers

nothing calls this directly

Calls 3

PointClass · 0.70
assertEqualMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected