MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / test_change_component

Method test_change_component

linear_algebra/src/test_linear_algebra.py:119–126  ·  view source on GitHub ↗

test for method change_component()

(self)

Source from the content-addressed store, hash-verified

117 assert str(x) == str(y)
118
119 def test_change_component(self) -> None:
120 """
121 test for method change_component()
122 """
123 x = Vector([1, 0, 0])
124 x.change_component(0, 0)
125 x.change_component(1, 1)
126 assert str(x) == "(0,1,0)"
127
128 def test_str_matrix(self) -> None:
129 """

Callers

nothing calls this directly

Calls 2

change_componentMethod · 0.95
VectorClass · 0.85

Tested by

no test coverage detected