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

Method test_component

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

test for method component

(self)

Source from the content-addressed store, hash-verified

16
17class Test(unittest.TestCase):
18 def test_component(self):
19 """
20 test for method component
21 """
22 x = Vector([1, 2, 3])
23 self.assertEqual(x.component(0), 1)
24 self.assertEqual(x.component(2), 3)
25 try:
26 y = Vector()
27 self.assertTrue(False)
28 except:
29 self.assertTrue(True)
30
31 def test_str(self):
32 """

Callers

nothing calls this directly

Calls 2

componentMethod · 0.95
VectorClass · 0.85

Tested by

no test coverage detected