MCPcopy Index your code
hub / github.com/bpython/bpython / test_operators_on_numbers

Method test_operators_on_numbers

bpython/test/test_simpleeval.py:79–86  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

77 simple_eval("a + 1", {"a": Spam()})
78
79 def test_operators_on_numbers(self):
80 self.assertEqual(simple_eval("-2"), -2)
81 self.assertEqual(simple_eval("1 + 1"), 2)
82 self.assertEqual(simple_eval("a - 2", {"a": 1}), -1)
83 with self.assertRaises(ValueError):
84 simple_eval("2 * 3")
85 with self.assertRaises(ValueError):
86 simple_eval("2 ** 3")
87
88 def test_function_calls_raise(self):
89 with self.assertRaises(ValueError):

Callers

nothing calls this directly

Calls 1

simple_evalFunction · 0.90

Tested by

no test coverage detected