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

Method test01_out

tables/tests/test_expression.py:134–149  ·  view source on GitHub ↗

Checking that expression is correctly evaluated (`out` param)

(self)

Source from the content-addressed store, hash-verified

132 )
133
134 def test01_out(self):
135 """Checking that expression is correctly evaluated (`out` param)"""
136
137 expr = tb.Expr(self.expr, self.vars)
138 expr.set_output(self.r1)
139 r1 = expr.eval()
140 if self.kind != "NumPy":
141 r1 = r1[:]
142 r2 = eval(self.expr, self.npvars)
143 if common.verbose:
144 print("Computed expression:", repr(r1))
145 print("Should look like:", repr(r2))
146 self.assertTrue(
147 common.areArraysEqual(r1, r2),
148 "Evaluate is returning a wrong value.",
149 )
150
151 def test02_out(self):
152 """Checking that expression is correctly evaluated when slice is

Callers

nothing calls this directly

Calls 2

set_outputMethod · 0.95
evalMethod · 0.95

Tested by

no test coverage detected