Skip to content

Commit 73e154c

Browse files
committed
Make test_pdb independent from CPython tests
1 parent d8a7f3c commit 73e154c

File tree

1 file changed

+12
-4
lines changed
  • graalpython/com.oracle.graal.python.test/src/tests

1 file changed

+12
-4
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_pdb.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,23 @@
3737
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3838
# SOFTWARE.
3939

40-
from test.test_doctest import _FakeInput
41-
4240
import doctest
4341
import sys
4442

4543

46-
class PdbTestInput(object):
47-
"""Context manager that makes testing Pdb in doctests easier."""
44+
# Copied from test_doctest
45+
class _FakeInput:
46+
def __init__(self, lines):
47+
self.lines = lines
48+
49+
def readline(self):
50+
line = self.lines.pop(0)
51+
print(line)
52+
return line + '\n'
4853

54+
55+
# Copied from test_pdb
56+
class PdbTestInput(object):
4957
def __init__(self, input):
5058
self.input = input
5159

0 commit comments

Comments
 (0)