MCPcopy Create free account
hub / github.com/bpython/bpython / assertEvaled

Method assertEvaled

bpython/test/test_simpleeval.py:104–110  ·  view source on GitHub ↗
(self, line, value, ns=None)

Source from the content-addressed store, hash-verified

102
103class TestEvaluateCurrentExpression(unittest.TestCase):
104 def assertEvaled(self, line, value, ns=None):
105 assert line.count("|") == 1
106 cursor_offset = line.find("|")
107 line = line.replace("|", "")
108 self.assertEqual(
109 evaluate_current_expression(cursor_offset, line, ns), value
110 )
111
112 def assertCannotEval(self, line, ns=None):
113 assert line.count("|") == 1

Callers 3

test_simpleMethod · 0.95
test_nonsenseMethod · 0.95
test_with_namespaceMethod · 0.95

Calls 1

Tested by

no test coverage detected