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

Method test02b_sss

tables/tests/test_expression.py:371–386  ·  view source on GitHub ↗

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

(self)

Source from the content-addressed store, hash-verified

369 )
370
371 def test02b_sss(self):
372 """Checking mixed objects and start, stop, step (II)"""
373
374 start, stop, step = (0, self.shape[0], self.step)
375 expr = tb.Expr(self.expr, self.vars)
376 expr.set_inputs_range(start, stop, step)
377 r1 = expr.eval()
378 npvars = get_sliced_vars(self.npvars, start, stop, step)
379 r2 = eval(self.expr, npvars)
380 if common.verbose:
381 print("Computed expression:", repr(r1), r1.dtype)
382 print("Should look like:", repr(r2), r2.dtype)
383 self.assertTrue(
384 common.areArraysEqual(r1, r2),
385 "Evaluate is returning a wrong value.",
386 )
387
388 def test02c_sss(self):
389 """Checking mixed objects and start, stop, step (III)"""

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