Skip to content

Commit 533e509

Browse files
committed
back to decorator skip
1 parent 7fd03e7 commit 533e509

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

IPython/lib/tests/test_pretty.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
from collections import Counter, defaultdict, deque, OrderedDict
99
import os
10-
import pytest
1110
import types
1211
import string
1312
import sys
@@ -16,6 +15,7 @@
1615
import nose.tools as nt
1716

1817
from IPython.lib import pretty
18+
from IPython.testing.decorators import skip_without
1919

2020
from io import StringIO
2121

@@ -119,12 +119,15 @@ def test_sets():
119119
yield nt.assert_equal, got_output, expected_output
120120

121121

122+
@skip_without("xxlimited" if sys.version_info < (3, 10) else "xxlimited_35")
122123
def test_pprint_heap_allocated_type():
123124
"""
124125
Test that pprint works for heap allocated types.
125126
"""
126-
module_name = "xxlimited" if sys.version_info < (3, 10) else "xxlimited_35"
127-
xxlimited = pytest.importorskip(module_name)
127+
if sys.version_info < (3, 10):
128+
import xxlimited
129+
else:
130+
import xxlimited_35
128131
output = pretty.pretty(xxlimited.Null)
129132
nt.assert_equal(output, 'xxlimited.Null')
130133

0 commit comments

Comments
 (0)