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

Method test_changeComponent

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

test for the changeComponent(...)-method

(self)

Source from the content-addressed store, hash-verified

108 self.assertEqual(x.__str__(), y.__str__())
109
110 def test_changeComponent(self):
111 """
112 test for the changeComponent(...)-method
113 """
114 x = Vector([1, 0, 0])
115 x.changeComponent(0, 0)
116 x.changeComponent(1, 1)
117 self.assertEqual(x.__str__(), "(0,1,0)")
118
119 def test_str_matrix(self):
120 A = Matrix([[1, 2, 3], [2, 4, 5], [6, 7, 8]], 3, 3)

Callers

nothing calls this directly

Calls 3

changeComponentMethod · 0.95
__str__Method · 0.95
VectorClass · 0.85

Tested by

no test coverage detected