Show More
@@ -12,7 +12,8 b' import types, string, ctypes' | |||
|
12 | 12 | import nose.tools as nt |
|
13 | 13 | |
|
14 | 14 | from IPython.lib import pretty |
|
15 | from IPython.testing.decorators import skip_without, py2_only, py3_only | |
|
15 | from IPython.testing.decorators import (skip_without, py2_only, py3_only, | |
|
16 | cpython2_only) | |
|
16 | 17 | from IPython.utils.py3compat import PY3, unicode_to_str |
|
17 | 18 | |
|
18 | 19 | if PY3: |
@@ -483,7 +484,7 b' def test_mappingproxy():' | |||
|
483 | 484 | for obj, expected in cases: |
|
484 | 485 | nt.assert_equal(pretty.pretty(obj), expected) |
|
485 | 486 | |
|
486 | @py2_only | |
|
487 | @cpython2_only # In PyPy, types.DictProxyType is dict | |
|
487 | 488 | def test_dictproxy(): |
|
488 | 489 | # This is the dictproxy constructor itself from the Python API, |
|
489 | 490 | DP = ctypes.pythonapi.PyDictProxy_New |
@@ -48,7 +48,7 b' from .ipunittest import ipdoctest, ipdocstring' | |||
|
48 | 48 | from IPython.external.decorators import * |
|
49 | 49 | |
|
50 | 50 | # For onlyif_cmd_exists decorator |
|
51 | from IPython.utils.py3compat import string_types, which, PY2, PY3 | |
|
51 | from IPython.utils.py3compat import string_types, which, PY2, PY3, PYPY | |
|
52 | 52 | |
|
53 | 53 | #----------------------------------------------------------------------------- |
|
54 | 54 | # Classes and functions |
@@ -336,6 +336,7 b" skip_known_failure = knownfailureif(True,'This test is known to fail')" | |||
|
336 | 336 | known_failure_py3 = knownfailureif(sys.version_info[0] >= 3, |
|
337 | 337 | 'This test is known to fail on Python 3.') |
|
338 | 338 | |
|
339 | cpython2_only = skipif(PY3 or PYPY, "This test only runs on CPython 2.") | |
|
339 | 340 | py2_only = skipif(PY3, "This test only runs on Python 2.") |
|
340 | 341 | py3_only = skipif(PY2, "This test only runs on Python 3.") |
|
341 | 342 |
General Comments 0
You need to be logged in to leave comments.
Login now