(self)
| 105 | self.assertRaises(SyntaxError, eval, "0 if 1Else 0") |
| 106 | |
| 107 | def test_underscore_literals(self): |
| 108 | for lit in VALID_UNDERSCORE_LITERALS: |
| 109 | self.assertEqual(eval(lit), eval(lit.replace('_', ''))) |
| 110 | for lit in INVALID_UNDERSCORE_LITERALS: |
| 111 | self.assertRaises(SyntaxError, eval, lit) |
| 112 | # Sanity check: no literal begins with an underscore |
| 113 | self.assertRaises(NameError, eval, "_0") |
| 114 | |
| 115 | @unittest.expectedFailure # TODO: RUSTPYTHON |
| 116 | def test_bad_numerical_literals(self): |
nothing calls this directly
no test coverage detected