()
| 175 | |
| 176 | |
| 177 | def test_eq_ops(): |
| 178 | # NOTE: the `== None` / `!= None` below are intentional and must NOT be |
| 179 | # rewritten as `is None` / `is not None`. This test exercises the overloaded |
| 180 | # `__eq__` / `__ne__` operators on `IntImm` / `StringImm`; the `is` operators |
| 181 | # bypass those overloads and would defeat the test. |
| 182 | a = tirx.IntImm("int8", 1) |
| 183 | with pytest.raises(ValueError): |
| 184 | assert a != None |
| 185 | with pytest.raises(ValueError): |
| 186 | assert not a == None |
| 187 | b = tirx.StringImm("abc") |
| 188 | assert b != None |
| 189 | assert not b == None |
| 190 | |
| 191 | |
| 192 | if __name__ == "__main__": |
no outgoing calls
no test coverage detected
searching dependent graphs…