Run windows tests with `-u all` (#8134) · RustPython/RustPython@55b96f9 · GitHub
Skip to content

Commit 55b96f9

Browse files
authored
Run windows tests with -u all (#8134)
* Enable all test resources on windows * Mark tests * mark wmi test
1 parent 9bb6ba8 commit 55b96f9

8 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 2 additions & 1 deletion

Lib/test/test_codecmaps_kr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class TestCP949Map(multibytecodec_support.TestBase_Mapping,
1111
encoding = 'cp949'
1212
mapfileurl = 'http://www.pythontest.net/unicode/CP949.TXT'
1313

14-
@unittest.expectedFailure # TODO: RUSTPYTHON; LookupError: unknown encoding: cp949
14+
@unittest.expectedFailureIf(__import__("sys").platform in ("android", "darwin", "linux"), "TODO: RUSTPYTHON; LookupError: unknown encoding: cp949")
1515
def test_mapping_file(self):
1616
return super().test_mapping_file()
1717

Lib/test/test_codecmaps_tw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class TestCP950Map(multibytecodec_support.TestBase_Mapping,
2727
(b"\xFFxy", "replace", "\ufffdxy"),
2828
)
2929

30-
@unittest.expectedFailure # TODO: RUSTPYTHON; LookupError: unknown encoding: cp950
30+
@unittest.expectedFailureIf(__import__("sys").platform in ("android", "darwin", "linux"), "TODO: RUSTPYTHON; LookupError: unknown encoding: cp950")
3131
def test_errorhandle(self):
3232
return super().test_errorhandle()
3333

Lib/test/test_tokenize.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2173,6 +2173,7 @@ def test_string_concatenation(self):
21732173
# Two string literals on the same line
21742174
self.check_roundtrip("'' ''")
21752175

2176+
@unittest.skipIf(support.is_resource_enabled("cpu") and __import__("sys").platform == "win32", "TODO: RUSTPYTHON; Timeout after 10 minutes")
21762177
def test_random_files(self):
21772178
# Test roundtrip on random python modules.
21782179
# pass the '-ucpu' option to process the full directory.

Lib/test/test_venv.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,7 @@ def nicer_error(self):
10941094
f"**Subprocess Error**\n{err}"
10951095
)
10961096

1097+
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON; FileNotFoundError: [WinError 2] No such file or directory")
10971098
@requires_venv_with_pip()
10981099
@requires_resource('cpu')
10991100
def test_with_pip(self):

Lib/test/test_winconsoleio.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ def test_write_empty_data(self):
142142
with ConIO('CONOUT$', 'w') as f:
143143
self.assertEqual(f.write(b''), 0)
144144

145+
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
145146
@requires_resource('console')
146147
def test_write(self):
147148
testcases = []

Lib/test/test_winsound.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def test_keyword_args(self):
100100

101101
class PlaySoundTest(unittest.TestCase):
102102

103+
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON; TypeError: a bytes-like object is required, not 'str'")
103104
def test_errors(self):
104105
self.assertRaises(TypeError, winsound.PlaySound)
105106
self.assertRaises(TypeError, winsound.PlaySound, "bad", "bad")

Lib/test/test_wmi.py

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)