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

Method testStr

tools/swig/test/testArray.py:353–356  ·  view source on GitHub ↗

Test ArrayZ __str__ method

(self)

Source from the content-addressed store, hash-verified

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"
355 for i in range(self.array3.length()): self.array3[i] = complex(i-2,(i-2)*2)
356 self.assertTrue(str(self.array3) == "[ (-2,-4), (-1,-2), (0,0), (1,2), (2,4) ]")
357
358 def testView(self):
359 "Test ArrayZ view method"

Callers

nothing calls this directly

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected