Skip to content

Commit 5ab3087

Browse files
disable some tests for pypy
1 parent 18f6901 commit 5ab3087

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

bpython/test/test_inspection.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import os
2+
import sys
23
import unittest
34

45
from bpython import inspection
56
from bpython.test.fodder import encoding_ascii
67
from bpython.test.fodder import encoding_latin1
78
from bpython.test.fodder import encoding_utf8
89

10+
pypy = "PyPy" in sys.version
11+
912
try:
1013
import numpy
1114
except ImportError:
@@ -118,6 +121,7 @@ def test_get_source_file(self):
118121
)
119122
self.assertEqual(encoding, "utf-8")
120123

124+
@unittest.skipIf(pypy, "pypy builtin signatures aren't complete")
121125
def test_getfuncprops_print(self):
122126
props = inspection.getfuncprops("print", print)
123127

bpython/test/test_interpreter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def test_syntaxerror(self):
5353
+ green('"<input>"')
5454
+ ", line "
5555
+ bold(magenta("1"))
56-
+ "\n 1.1.1.1\n ^\n"
56+
+ "\n 1.1.1.1\n ^\n"
5757
+ bold(red("SyntaxError"))
5858
+ ": "
5959
+ cyan("invalid syntax")

bpython/test/test_repl.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ def set_input_line(self, line):
157157
def test_func_name(self):
158158
for (line, expected_name) in [
159159
("spam(", "spam"),
160-
("spam(map([]", "map"),
160+
# map pydoc has no signature in pypy
161+
("spam(any([]", "any") if pypy else ("spam(map([]", "map"),
161162
("spam((), ", "spam"),
162163
]:
163164
self.set_input_line(line)
@@ -167,7 +168,8 @@ def test_func_name(self):
167168
def test_func_name_method_issue_479(self):
168169
for (line, expected_name) in [
169170
("o.spam(", "spam"),
170-
("o.spam(map([]", "map"),
171+
# map pydoc has no signature in pypy
172+
("o.spam(any([]", "any") if pypy else ("o.spam(map([]", "map"),
171173
("o.spam((), ", "spam"),
172174
]:
173175
self.set_input_line(line)
@@ -200,6 +202,7 @@ def test_lambda_position(self):
200202
# Argument position
201203
self.assertEqual(self.repl.arg_pos, 1)
202204

205+
@unittest.skipIf(pypy, "range pydoc has no signature in pypy")
203206
def test_issue127(self):
204207
self.set_input_line("x=range(")
205208
self.assertTrue(self.repl.get_args())

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy