Skip to content

Commit 4e9fb55

Browse files
committed
Added skips for tests missing vital modules/attributes
1 parent 492f031 commit 4e9fb55

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

Lib/test/test_free_threading/test_monitoring.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# TODO: RUSTPYTHON
2+
try:
3+
import unittest
4+
from sys import monitoring
5+
except ImportError:
6+
raise unittest.SkipTest('TODO: RUSTPYTHON; cannot import name "monitoring" from sys')
7+
18
"""Tests monitoring, sys.settrace, and sys.setprofile in a multi-threaded
29
environment to verify things are thread-safe in a free-threaded build"""
310

Lib/test/test_unparse.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# TODO: RUSTPYTHON
2+
try:
3+
nonlocal_ex = """\
4+
def f():
5+
x = 1
6+
def g():
7+
nonlocal x
8+
x = 2
9+
y = 7
10+
def h():
11+
nonlocal x, y
12+
"""
13+
import ast
14+
import unittest
15+
ast1 = ast.parse(nonlocal_ex)
16+
code2 = ast.unparse(ast1)
17+
except AttributeError:
18+
raise unittest.SkipTest('TODO: RUSTPYTHON; type_comment attribute not implemented. FunctionDef, AsyncFunctionDef, For, AsyncFor, With and AsyncWith should have attribute')
19+
120
"""Tests for ast.unparse."""
221

322
import unittest
@@ -512,6 +531,7 @@ def test_class_bases_and_keywords(self):
512531
self.check_src_roundtrip("class X(*args):\n pass")
513532
self.check_src_roundtrip("class X(*args, **kwargs):\n pass")
514533

534+
@unittest.expectedFailure # TODO: RUSTPYTHON; f"{f'{x!ÿ}\n'!ÿ}\n"
515535
def test_fstrings(self):
516536
self.check_src_roundtrip('''f\'\'\'-{f"""*{f"+{f'.{x}.'}+"}*"""}-\'\'\'''')
517537
self.check_src_roundtrip('''f\'-{f\'\'\'*{f"""+{f".{f'{x}'}."}+"""}*\'\'\'}-\'''')
@@ -651,6 +671,7 @@ def test_multiquote_joined_string(self):
651671
self.check_ast_roundtrip("""f'''""\"''\\'{"\\n\\"'"}''' """)
652672
self.check_ast_roundtrip("""f'''""\"''\\'{""\"\\n\\"'''""\" '''\\n'''}''' """)
653673

674+
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: SyntaxWarning not triggered
654675
def test_backslash_in_format_spec(self):
655676
import re
656677
msg = re.escape("invalid escape sequence '\\ '")

0 commit comments

Comments
 (0)