Checking that expression is correctly evaluated (`out` param)
(self)
| 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 |
nothing calls this directly
no test coverage detected