MCPcopy Create free account
hub / github.com/pexpect/pexpect / test_python

Method test_python

tests/test_replwrap.py:112–121  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

110 assert False, "Didn't raise ValueError for empty input"
111
112 def test_python(self):
113 if platform.python_implementation() == 'PyPy':
114 raise unittest.SkipTest(skip_pypy)
115
116 p = replwrap.python()
117 res = p.run_command('4+7')
118 assert res.strip() == '11'
119
120 res = p.run_command('for a in range(3): print(a)\n')
121 assert res.strip().splitlines() == ['0', '1', '2']
122
123 def test_no_change_prompt(self):
124 if platform.python_implementation() == 'PyPy':

Callers

nothing calls this directly

Calls 1

run_commandMethod · 0.80

Tested by

no test coverage detected