MCPcopy Create free account
hub / github.com/numpy/numpy / testAsString

Method testAsString

tools/swig/test/testArray.py:98–101  ·  view source on GitHub ↗

Test Array1 asString method

(self)

Source from the content-addressed store, hash-verified

96 self.assertRaises(IndexError, self.array1.__getitem__, self.length+1)
97
98 def testAsString(self):
99 "Test Array1 asString method"
100 for i in range(self.array1.length()): self.array1[i] = i+1
101 self.assertTrue(self.array1.asString() == "[ 1, 2, 3, 4, 5 ]")
102
103 def testStr(self):
104 "Test Array1 __str__ method"

Callers

nothing calls this directly

Calls 2

lengthMethod · 0.45
asStringMethod · 0.45

Tested by

no test coverage detected