Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Lib/test/test_bufio.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ def test_nullpat(self):
class CBufferSizeTest(BufferSizeTest, unittest.TestCase):
open = io.open

# TODO: RUSTPYTHON
import sys
@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON, can't cleanup temporary file on Windows")
class PyBufferSizeTest(BufferSizeTest, unittest.TestCase):
open = staticmethod(pyio.open)

Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_cmd_line_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,6 @@ def test_syntaxerror_unindented_caret_position(self):
# Confirm that the caret is located under the '=' sign
self.assertIn("\n ^^^^^\n", text)

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_syntaxerror_indented_caret_position(self):
script = textwrap.dedent("""\
if True:
Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_codecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3451,7 +3451,6 @@ def decode_to_bytes(*args, **kwds):
class CodePageTest(unittest.TestCase):
CP_UTF8 = 65001

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_invalid_code_page(self):
self.assertRaises(ValueError, codecs.code_page_encode, -1, 'a')
self.assertRaises(ValueError, codecs.code_page_decode, -1, b'a')
Expand Down Expand Up @@ -3670,7 +3669,6 @@ def test_multibyte_encoding(self):
('[\U0010ffff\uDC80]', 'replace', b'[\xf4\x8f\xbf\xbf?]'),
))

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_code_page_decode_flags(self):
# Issue #36312: For some code pages (e.g. UTF-7) flags for
# MultiByteToWideChar() must be set to 0.
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_compileall.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,6 @@ def test_recursion_limit(self):
self.assertCompiled(spamfn)
self.assertCompiled(eggfn)

@unittest.skipIf(sys.platform == 'win32', 'TODO: RUSTPYTHON hangs')
@os_helper.skip_unless_symlink
def test_symlink_loop(self):
# Currently, compileall ignores symlinks to directories.
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_concurrent_futures/test_wait.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def test_first_completed_some_already_completed(self): super().test_first_comple
def test_first_exception(self): super().test_first_exception() # TODO: RUSTPYTHON
@unittest.skipIf(sys.platform == 'linux', "TODO: RUSTPYTHON flaky")
def test_first_exception_one_already_failed(self): super().test_first_exception_one_already_failed() # TODO: RUSTPYTHON
@unittest.skipIf(sys.platform == 'linux', "TODO: RUSTPYTHON Fatal Python error: Segmentation fault")
@unittest.skipIf(sys.platform != 'win32', "TODO: RUSTPYTHON flaky")
def test_first_exception_some_already_complete(self): super().test_first_exception_some_already_complete() # TODO: RUSTPYTHON
@unittest.skipIf(sys.platform == 'linux', "TODO: RUSTPYTHON Fatal Python error: Segmentation fault")
def test_timeout(self): super().test_timeout() # TODO: RUSTPYTHON
Expand Down
4 changes: 0 additions & 4 deletions Lib/test/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,6 @@ def __init__(self, fancy_arg):
x = DerivedException(fancy_arg=42)
self.assertEqual(x.fancy_arg, 42)

@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON; Windows")
@no_tracing
def testInfiniteRecursion(self):
def f():
Expand Down Expand Up @@ -1415,7 +1414,6 @@ def __str__(self):
exc = UnicodeTranslateError("x", 0, 1, Evil("reason"))
self.assertRaises(TypeError, str, exc)

@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON; Windows")
@no_tracing
def test_badisinstance(self):
# Bug #2542: if issubclass(e, MyException) raises an exception,
Expand Down Expand Up @@ -1700,7 +1698,6 @@ def inner():
gc_collect() # For PyPy or other GCs.
self.assertEqual(wr(), None)

@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON; Windows")
@no_tracing
def test_recursion_error_cleanup(self):
# Same test as above, but with "recursion exceeded" errors
Expand All @@ -1722,7 +1719,6 @@ def inner():
gc_collect() # For PyPy or other GCs.
self.assertEqual(wr(), None)

@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON; error specific to cpython")
def test_errno_ENOTDIR(self):
# Issue #12802: "not a directory" errors are ENOTDIR even on Windows
with self.assertRaises(OSError) as cm:
Expand Down
3 changes: 0 additions & 3 deletions Lib/test/test_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -3630,7 +3630,6 @@ def test_spawnl(self):
exitcode = os.spawnl(os.P_WAIT, program, *args)
self.assertEqual(exitcode, self.exitcode)

@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON; fix spawnve on Windows")
@requires_os_func('spawnle')
def test_spawnle(self):
program, args = self.create_args(with_env=True)
Expand Down Expand Up @@ -3659,7 +3658,6 @@ def test_spawnv(self):
exitcode = os.spawnv(os.P_WAIT, FakePath(program), args)
self.assertEqual(exitcode, self.exitcode)

@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON; fix spawnve on Windows")
@requires_os_func('spawnve')
def test_spawnve(self):
program, args = self.create_args(with_env=True)
Expand Down Expand Up @@ -3767,7 +3765,6 @@ def _test_invalid_env(self, spawn):
exitcode = spawn(os.P_WAIT, program, args, newenv)
self.assertEqual(exitcode, 0)

@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON; fix spawnve on Windows")
@requires_os_func('spawnve')
def test_spawnve_invalid_env(self):
self._test_invalid_env(os.spawnve)
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_posix.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,6 @@ def test_chmod_file_symlink(self):
self.check_chmod_link(posix.chmod, target, link)
self.check_chmod_link(posix.chmod, target, link, follow_symlinks=True)

@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON; flaky")
@os_helper.skip_unless_symlink
def test_chmod_dir_symlink(self):
target = self.tempdir()
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_runpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,6 @@ def test_basic_script_no_suffix(self):
self._check_script(script_name, "<run_path>", script_name,
script_name, expect_spec=False)

@unittest.skipIf(sys.platform == 'win32', "TODO: RUSTPYTHON; weird panic in lz4-flex")
def test_script_compiled(self):
with temp_dir() as script_dir:
mod_name = 'script'
Expand Down
4 changes: 0 additions & 4 deletions Lib/test/test_script_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def tearDown(self):
# Reset the private cached state.
script_helper.__dict__['__cached_interp_requires_environment'] = None

@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON, ValueError: illegal environment variable name")
@mock.patch('subprocess.check_call')
def test_interpreter_requires_environment_true(self, mock_check_call):
with mock.patch.dict(os.environ):
Expand All @@ -92,7 +91,6 @@ def test_interpreter_requires_environment_true(self, mock_check_call):
self.assertTrue(script_helper.interpreter_requires_environment())
self.assertEqual(1, mock_check_call.call_count)

@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON, ValueError: illegal environment variable name")
@mock.patch('subprocess.check_call')
def test_interpreter_requires_environment_false(self, mock_check_call):
with mock.patch.dict(os.environ):
Expand All @@ -102,7 +100,6 @@ def test_interpreter_requires_environment_false(self, mock_check_call):
self.assertFalse(script_helper.interpreter_requires_environment())
self.assertEqual(1, mock_check_call.call_count)

@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON, ValueError: illegal environment variable name")
@mock.patch('subprocess.check_call')
def test_interpreter_requires_environment_details(self, mock_check_call):
with mock.patch.dict(os.environ):
Expand All @@ -115,7 +112,6 @@ def test_interpreter_requires_environment_details(self, mock_check_call):
self.assertEqual(sys.executable, check_call_command[0])
self.assertIn('-E', check_call_command)

@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON, ValueError: illegal environment variable name")
@mock.patch('subprocess.check_call')
def test_interpreter_requires_environment_with_pythonhome(self, mock_check_call):
with mock.patch.dict(os.environ):
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -1902,7 +1902,7 @@ def test_run_with_pathlike_path_and_arguments(self):
res = subprocess.run(args)
self.assertEqual(res.returncode, 57)

@unittest.skipIf(mswindows, 'TODO: RUSTPYTHON; Flakey')
@unittest.skipIf(mswindows, 'TODO: RUSTPYTHON; empty env block fails nondeterministically')
@unittest.skipUnless(mswindows, "Maybe test trigger a leak on Ubuntu")
def test_run_with_an_empty_env(self):
# gh-105436: fix subprocess.run(..., env={}) broken on Windows
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_weakref.py
Original file line number Diff line number Diff line change
Expand Up @@ -2253,7 +2253,6 @@ def error():
assert f3.atexit == True
assert f4.atexit == True

@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON; Windows")
def test_atexit(self):
prog = ('from test.test_weakref import FinalizeTestCase;'+
'FinalizeTestCase.run_in_child()')
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_zipfile/_path/test_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ def test_inheritance(self, alpharep):
file = cls(alpharep).joinpath('some dir').parent
assert isinstance(file, cls)

@unittest.skipIf(sys.platform == 'win32', 'TODO: RUSTPYTHON; fails on Windows')
@parameterize(
['alpharep', 'path_type', 'subpath'],
itertools.product(
Expand Down
4 changes: 2 additions & 2 deletions crates/vm/src/exceptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ impl VirtualMachine {
}

if let Some(text) = maybe_text {
// if text ends with \n, remove it
let r_text = text.as_str().trim_end_matches('\n');
// if text ends with \n or \r\n, remove it
let r_text = text.as_str().trim_end_matches(['\n', '\r']);
let l_text = r_text.trim_start_matches([' ', '\n', '\x0c']); // \x0c is \f
let spaces = (r_text.len() - l_text.len()) as isize;

Expand Down
Loading
Loading