Skip to content

Commit 1daf2f1

Browse files
authored
Merge pull request RustPython#3966 from youknowone/fix-windows-ci
fix windows CI
2 parents dfc9b6a + e62fdd1 commit 1daf2f1

File tree

6 files changed

+6
-24
lines changed

6 files changed

+6
-24
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,13 @@ jobs:
235235
name: run cpython platform-dependent tests (windows partial - fixme)
236236
run:
237237
target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }}
238+
test_glob
238239
test_importlib
239240
test_io
240241
test_iter
241242
test_os
242243
test_pathlib
244+
test_posixpath
243245
test_shutil
244246
test_venv
245247
- if: runner.os != 'Windows'

Lib/test/test_ntpath.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -650,10 +650,6 @@ def test_relpath(self):
650650
tester('ntpath.relpath("/a/b", "/a/b")', '.')
651651
tester('ntpath.relpath("c:/foo", "C:/FOO")', '.')
652652

653-
# TODO: RUSTPYTHON, FileExistsError: [Errno 183] Cannot create a file when that file already exists. (os error 183): 'None' -> 'None'
654-
if sys.platform == "win32":
655-
test_relpath = unittest.expectedFailure(test_relpath)
656-
657653
def test_commonpath(self):
658654
def check(paths, expected):
659655
tester(('ntpath.commonpath(%r)' % paths).replace('\\\\', '\\'),

Lib/test/test_py_compile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ def test_do_not_overwrite_symlinks(self):
8989
with self.assertRaises(FileExistsError):
9090
py_compile.compile(self.source_path, self.pyc_path)
9191

92+
# TODO: RUSTPYTHON
93+
if sys.platform == 'win32':
94+
test_do_not_overwrite_symlinks = unittest.expectedFailure(test_do_not_overwrite_symlinks)
95+
9296
@unittest.skipIf(not os.path.exists(os.devnull) or os.path.isfile(os.devnull),
9397
'requires os.devnull and for it to be a non-regular file')
9498
def test_do_not_overwrite_nonregular_files(self):

Lib/test/test_sys.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,6 @@ def check_exit_message(code, expected, **env_vars):
187187
# r'import sys; sys.exit("h\xe9")',
188188
# b"h\xe9", PYTHONIOENCODING='latin-1')
189189

190-
# TODO: RUSTPYTHON
191-
if sys.platform == 'win32':
192-
test_exit = unittest.expectedFailure(test_exit)
193-
194190
def test_getdefaultencoding(self):
195191
self.assertRaises(TypeError, sys.getdefaultencoding, 42)
196192
# can't check more than the type, as the user might have changed it
@@ -957,10 +953,6 @@ def __del__(self):
957953
self.assertEqual(stdout.rstrip(), b"")
958954
self.assertEqual(stderr.rstrip(), b"")
959955

960-
# TODO: RUSTPYTHON
961-
if sys.platform == 'win32':
962-
test_sys_ignores_cleaning_up_user_data = unittest.expectedFailure(test_sys_ignores_cleaning_up_user_data)
963-
964956
@unittest.skipUnless(hasattr(sys, 'getandroidapilevel'),
965957
'need sys.getandroidapilevel()')
966958
def test_getandroidapilevel(self):

Lib/test/test_tarfile.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,10 +1262,6 @@ def test_symlink_size(self):
12621262
finally:
12631263
os_helper.unlink(path)
12641264

1265-
# TODO: RUSTPYTHON
1266-
if sys.platform == "win32":
1267-
test_symlink_size = unittest.expectedFailure(test_symlink_size)
1268-
12691265
def test_add_self(self):
12701266
# Test for #1257255.
12711267
dstname = os.path.abspath(tmpname)
@@ -1424,10 +1420,6 @@ def test_cwd(self):
14241420
finally:
14251421
tar.close()
14261422

1427-
# TODO: RUSTPYTHON
1428-
if sys.platform == "win32":
1429-
test_cwd = unittest.expectedFailure(test_cwd)
1430-
14311423
def test_open_nonwritable_fileobj(self):
14321424
for exctype in OSError, EOFError, RuntimeError:
14331425
class BadFile(io.BytesIO):

Lib/unittest/test/test_runner.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,10 +1194,6 @@ def get_parse_out_err(p):
11941194
for msg in [ae_msg, at_msg]:
11951195
self.assertEqual(out.count(msg), 1)
11961196

1197-
# TODO: RUSTPYTHON
1198-
if sys.platform == 'win32':
1199-
test_warnings = unittest.expectedFailure(test_warnings)
1200-
12011197
def testStdErrLookedUpAtInstantiationTime(self):
12021198
# see issue 10786
12031199
old_stderr = sys.stderr

0 commit comments

Comments
 (0)