MCPcopy Index your code
hub / github.com/python/cpython / _assert_arithmetic_cases

Method _assert_arithmetic_cases

Lib/test/test_turtle.py:212–225  ·  view source on GitHub ↗
(self, test_cases, lambda_operator)

Source from the content-addressed store, hash-verified

210 self.assertIsInstance(unpickled, Vec2D)
211
212 def _assert_arithmetic_cases(self, test_cases, lambda_operator):
213 for test_case in test_cases:
214 with self.subTest(case=test_case):
215
216 ((first, second), expected) = test_case
217
218 op1 = Vec2D(*first)
219 op2 = Vec2D(*second)
220
221 result = lambda_operator(op1, op2)
222
223 expected = Vec2D(*expected)
224
225 self.assertVectorsAlmostEqual(result, expected)
226
227 def test_vector_addition(self):
228

Callers 2

test_vector_additionMethod · 0.95

Calls 3

Vec2DClass · 0.70
subTestMethod · 0.45

Tested by

no test coverage detected