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

Method test02a_sss

tables/tests/test_expression.py:354–369  ·  view source on GitHub ↗

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

(self)

Source from the content-addressed store, hash-verified

352 self.assertEqual(r1.dtype.kind, r2.dtype.kind)
353
354 def test02a_sss(self):
355 """Checking mixed objects and start, stop, step (I)"""
356
357 start, stop, step = (self.start, self.stop, 1)
358 expr = tb.Expr(self.expr, self.vars)
359 expr.set_inputs_range(start, stop, step)
360 r1 = expr.eval()
361 npvars = get_sliced_vars(self.npvars, start, stop, step)
362 r2 = eval(self.expr, npvars)
363 if common.verbose:
364 print("Computed expression:", repr(r1), r1.dtype)
365 print("Should look like:", repr(r2), r2.dtype)
366 self.assertTrue(
367 common.areArraysEqual(r1, r2),
368 "Evaluate is returning a wrong value.",
369 )
370
371 def test02b_sss(self):
372 """Checking mixed objects and start, stop, step (II)"""

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