Checking the __iter__ iterator (with ranges, III)
(self)
| 1373 | ) |
| 1374 | |
| 1375 | def test01c_sss(self): |
| 1376 | """Checking the __iter__ iterator (with ranges, III)""" |
| 1377 | |
| 1378 | start, stop, step = self.range_ |
| 1379 | expr = tb.Expr(self.sexpr, self.vars) |
| 1380 | expr.set_inputs_range(start, stop, step) |
| 1381 | r1 = np.array([row for row in expr]) |
| 1382 | npvars = get_sliced_vars2( |
| 1383 | self.npvars, start, stop, step, self.shape, self.maindim |
| 1384 | ) |
| 1385 | r2 = eval(self.sexpr, npvars) |
| 1386 | if common.verbose: |
| 1387 | print("Tested shape, maindim:", self.shape, self.maindim) |
| 1388 | print("Computed expression:", repr(r1[:]), r1.dtype) |
| 1389 | print("Should look like:", repr(r2), r2.dtype) |
| 1390 | self.assertTrue( |
| 1391 | common.areArraysEqual(r1[:], r2), |
| 1392 | "Evaluate is returning a wrong value.", |
| 1393 | ) |
| 1394 | |
| 1395 | |
| 1396 | class iter0(iterTestCase): |
nothing calls this directly
no test coverage detected