Checking expressions with mixed objects.
(self)
| 270 | } |
| 271 | |
| 272 | def test00a_simple(self): |
| 273 | """Checking expressions with mixed objects.""" |
| 274 | |
| 275 | expr = tb.Expr(self.expr, self.vars) |
| 276 | r1 = expr.eval() |
| 277 | r2 = eval(self.expr, self.npvars) |
| 278 | if common.verbose: |
| 279 | print("Computed expression:", repr(r1), r1.dtype) |
| 280 | print("Should look like:", repr(r2), r2.dtype) |
| 281 | |
| 282 | self.assertTrue( |
| 283 | common.areArraysEqual(r1, r2), |
| 284 | "Evaluate is returning a wrong value.", |
| 285 | ) |
| 286 | |
| 287 | def test00b_simple_scalars(self): |
| 288 | """Checking that scalars in expression evaluate correctly.""" |