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

Method test_simple

bpython/test/test_curtsies_coderunner.py:17–29  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

15 sys.stderr = self.orig_stderr
16
17 def test_simple(self):
18 c = CodeRunner(
19 request_refresh=lambda: self.orig_stdout.flush()
20 or self.orig_stderr.flush()
21 )
22 stdout = FakeOutput(c, lambda *args, **kwargs: None, None)
23 stderr = FakeOutput(c, lambda *args, **kwargs: None, None)
24 sys.stdout = stdout
25 sys.stdout = stderr
26 c.load_code("1 + 1")
27 c.run_code()
28 c.run_code()
29 c.run_code()
30
31 def test_exception(self):
32 c = CodeRunner(

Callers

nothing calls this directly

Calls 5

load_codeMethod · 0.95
run_codeMethod · 0.95
CodeRunnerClass · 0.90
FakeOutputClass · 0.90
flushMethod · 0.45

Tested by

no test coverage detected