MCPcopy Index your code
hub / github.com/geekcomputers/Python / test_sub

Method test_sub

linear-algebra-python/src/tests.py:62–70  ·  view source on GitHub ↗

test for - operator

(self)

Source from the content-addressed store, hash-verified

60 self.assertEqual((x + y).component(2), 4)
61
62 def test_sub(self):
63 """
64 test for - operator
65 """
66 x = Vector([1, 2, 3])
67 y = Vector([1, 1, 1])
68 self.assertEqual((x - y).component(0), 0)
69 self.assertEqual((x - y).component(1), 1)
70 self.assertEqual((x - y).component(2), 2)
71
72 def test_mul(self):
73 """

Callers

nothing calls this directly

Calls 2

VectorClass · 0.85
componentMethod · 0.45

Tested by

no test coverage detected