Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0fd79ff

Browse files
committed
Skip test on problematic PyPy versions
See pypy/pypy#4860
1 parent b14df38 commit 0fd79ff

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

IPython/core/tests/test_interactiveshell.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,12 @@ def test_reset_aliasing(self):
577577
self.assertEqual(res.success, True)
578578

579579

580+
@pytest.mark.skipif(
581+
sys.implementation.name == "pypy"
582+
and ((7, 3, 13) < sys.implementation.version < (7, 3, 16)),
583+
reason="Unicode issues with scandir on PyPy, see https://github.com/pypy/pypy/issues/4860",
584+
)
580585
class TestSafeExecfileNonAsciiPath(unittest.TestCase):
581-
582586
@onlyif_unicode_paths
583587
def setUp(self):
584588
self.BASETESTDIR = tempfile.mkdtemp()

IPython/core/tests/test_profile.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@
2424
import sys
2525
import tempfile
2626
from pathlib import Path
27+
from tempfile import TemporaryDirectory
2728
from unittest import TestCase
2829

29-
from tempfile import TemporaryDirectory
30+
import pytest
3031

3132
from IPython.core.profileapp import list_bundled_profiles, list_profiles_in
3233
from IPython.core.profiledir import ProfileDir
@@ -101,6 +102,11 @@ def test_startup_ipy(self):
101102
self.validate('Exception reporting mode: Plain')
102103

103104

105+
@pytest.mark.skipif(
106+
sys.implementation.name == "pypy"
107+
and ((7, 3, 13) < sys.implementation.version < (7, 3, 16)),
108+
reason="Unicode issues with scandir on PyPy, see https://github.com/pypy/pypy/issues/4860",
109+
)
104110
def test_list_profiles_in():
105111
# No need to remove these directories and files, as they will get nuked in
106112
# the module-level teardown.

IPython/utils/tests/test_io.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def test_tee_simple():
2020
tee = Tee(chan, channel='stdout')
2121
print(text, file=chan)
2222
assert chan.getvalue() == text + "\n"
23+
tee.close()
2324

2425

2526
class TeeTestCase(unittest.TestCase):

0 commit comments

Comments
 (0)