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

Method testAsString

tools/swig/test/testArray.py:348–351  ·  view source on GitHub ↗

Test ArrayZ asString method

(self)

Source from the content-addressed store, hash-verified

346 self.assertRaises(IndexError, self.array3.__getitem__, self.length+1)
347
348 def testAsString(self):
349 "Test ArrayZ asString method"
350 for i in range(self.array3.length()): self.array3[i] = complex(i+1,-i-1)
351 self.assertTrue(self.array3.asString() == "[ (1,-1), (2,-2), (3,-3), (4,-4), (5,-5) ]")
352
353 def testStr(self):
354 "Test ArrayZ __str__ method"

Callers

nothing calls this directly

Calls 2

lengthMethod · 0.45
asStringMethod · 0.45

Tested by

no test coverage detected