(self)
| 1876 | self.assertIs(whereis(Point(0, 0)), None) |
| 1877 | |
| 1878 | def test_patma_182(self): |
| 1879 | def whereis(points): |
| 1880 | match points: |
| 1881 | case []: |
| 1882 | return "No points" |
| 1883 | case [Point(0, 0)]: |
| 1884 | return "The origin" |
| 1885 | case [Point(x, y)]: |
| 1886 | return f"Single point {x}, {y}" |
| 1887 | case [Point(0, y1), Point(0, y2)]: |
| 1888 | return f"Two on the Y axis at {y1}, {y2}" |
| 1889 | case _: |
| 1890 | return "Something else" |
| 1891 | self.assertEqual(whereis([]), "No points") |
| 1892 | self.assertEqual(whereis([Point(0, 0)]), "The origin") |
| 1893 | self.assertEqual(whereis([Point(0, 1)]), "Single point 0, 1") |
| 1894 | self.assertEqual(whereis([Point(0, 0), Point(0, 0)]), "Two on the Y axis at 0, 0") |
| 1895 | self.assertEqual(whereis([Point(0, 1), Point(0, 1)]), "Two on the Y axis at 1, 1") |
| 1896 | self.assertEqual(whereis([Point(0, 0), Point(1, 0)]), "Something else") |
| 1897 | self.assertEqual(whereis([Point(0, 0), Point(0, 0), Point(0, 0)]), "Something else") |
| 1898 | self.assertEqual(whereis([Point(0, 1), Point(0, 1), Point(0, 1)]), "Something else") |
| 1899 | |
| 1900 | def test_patma_183(self): |
| 1901 | def whereis(point): |
nothing calls this directly
no test coverage detected