Skip to content

Commit 54d5aa0

Browse files
committed
Skip a test in older Python versions that do not support it.
1 parent a12da0c commit 54d5aa0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test_fractions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ def requires_IEEE_754(test): return test
2626
except ImportError:
2727
@contextlib.contextmanager
2828
def adjust_int_max_str_digits(max_digits):
29-
if not hasattr(sys, 'set_int_max_str_digits'):
30-
unittest.skip("needs sys.set_int_max_str_digits()")
29+
if not hasattr(sys, 'get_int_max_str_digits'):
30+
raise unittest.SkipTest("needs sys.set_int_max_str_digits()")
3131
old_max = sys.get_int_max_str_digits()
3232
sys.set_int_max_str_digits(max_digits)
3333
try:

0 commit comments

Comments
 (0)