MCPcopy Create free account
hub / github.com/PyTables/PyTables / test02c_sss

Method test02c_sss

tables/tests/test_expression.py:388–403  ·  view source on GitHub ↗

Checking mixed objects and start, stop, step (III)

(self)

Source from the content-addressed store, hash-verified

386 )
387
388 def test02c_sss(self):
389 """Checking mixed objects and start, stop, step (III)"""
390
391 start, stop, step = (self.start, self.stop, self.step)
392 expr = tb.Expr(self.expr, self.vars)
393 expr.set_inputs_range(start, stop, step)
394 r1 = expr.eval()
395 npvars = get_sliced_vars(self.npvars, start, stop, step)
396 r2 = eval(self.expr, npvars)
397 if common.verbose:
398 print("Computed expression:", repr(r1), r1.dtype)
399 print("Should look like:", repr(r2), r2.dtype)
400 self.assertTrue(
401 common.areArraysEqual(r1, r2),
402 "Evaluate is returning a wrong value.",
403 )
404
405 def test03_sss(self):
406 """Checking start, stop, step as numpy.int64."""

Callers

nothing calls this directly

Calls 3

set_inputs_rangeMethod · 0.95
evalMethod · 0.95
get_sliced_varsFunction · 0.85

Tested by

no test coverage detected