Checking that expression is correctly evaluated.
(self)
| 118 | } |
| 119 | |
| 120 | def test00_simple(self): |
| 121 | """Checking that expression is correctly evaluated.""" |
| 122 | |
| 123 | expr = tb.Expr(self.expr, self.vars) |
| 124 | r1 = expr.eval() |
| 125 | r2 = eval(self.expr, self.npvars) |
| 126 | if common.verbose: |
| 127 | print("Computed expression:", repr(r1)) |
| 128 | print("Should look like:", repr(r2)) |
| 129 | self.assertTrue( |
| 130 | common.areArraysEqual(r1, r2), |
| 131 | "Evaluate is returning a wrong value.", |
| 132 | ) |
| 133 | |
| 134 | def test01_out(self): |
| 135 | """Checking that expression is correctly evaluated (`out` param)""" |