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

Class Vec2D

Lib/test/test_typing.py:4677–4682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4675 def test_protocol_issubclass_error_message(self):
4676 @runtime_checkable
4677 class Vec2D(Protocol):
4678 x: float
4679 y: float
4680
4681 def square_norm(self) -> float:
4682 return self.x ** 2 + self.y ** 2
4683
4684 self.assertEqual(Vec2D.__protocol_attrs__, {'x', 'y', 'square_norm'})
4685 expected_error_message = (

Callers 14

test_constructorMethod · 0.70
test_reprMethod · 0.70
test_equalityMethod · 0.70
test_picklingMethod · 0.70
test_vector_multiplyMethod · 0.70
test_vector_negativeMethod · 0.70
test_distanceMethod · 0.70
test_rotateMethod · 0.70
test_forwardMethod · 0.70
test_backwardsMethod · 0.70
test_distanceMethod · 0.70

Calls

no outgoing calls

Tested by 14

test_constructorMethod · 0.56
test_reprMethod · 0.56
test_equalityMethod · 0.56
test_picklingMethod · 0.56
test_vector_multiplyMethod · 0.56
test_vector_negativeMethod · 0.56
test_distanceMethod · 0.56
test_rotateMethod · 0.56
test_forwardMethod · 0.56
test_backwardsMethod · 0.56
test_distanceMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…