MCPcopy Index your code
hub / github.com/subbarayudu-j/TheAlgorithms-Python / test_sub

Method test_sub

linear_algebra_python/src/tests.py:54–62  ·  view source on GitHub ↗

test for - operator

(self)

Source from the content-addressed store, hash-verified

52 self.assertEqual((x+y).component(1),3)
53 self.assertEqual((x+y).component(2),4)
54 def test_sub(self):
55 """
56 test for - operator
57 """
58 x = Vector([1,2,3])
59 y = Vector([1,1,1])
60 self.assertEqual((x-y).component(0),0)
61 self.assertEqual((x-y).component(1),1)
62 self.assertEqual((x-y).component(2),2)
63 def test_mul(self):
64 """
65 test for * operator

Callers

nothing calls this directly

Calls 2

VectorClass · 0.85
componentMethod · 0.45

Tested by

no test coverage detected