You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pattern matching. One quick way is to add this so that test_sys_modules tests it:
try:
importtest.test_patmaexceptImportError:
pass
This works, which suggests that no fixes are needed. Slightly less crude would be making a proper fixture file. Obviously a targeted test would be ideal.
Parenthesised context managers.
The text was updated successfully, but these errors were encountered:
ast.match_case nodes don't have lineno/col_offset, so ASTText doesn't support them, but ASTTokens does:
importastimportasttokenssource="""match foo: case bar: print(spam)"""atext=asttokens.ASTText(source)
print(ast.dump(atext.tree, include_attributes=True, indent=4))
match_case=atext.tree.body[0].cases[0]
assertatext.get_text(match_case) ==''assertatext.asttokens.get_text(match_case) =="""\ case bar: print(spam)"""
https://docs.python.org/3/whatsnew/3.10.html
test_sys_modules
tests it:This works, which suggests that no fixes are needed. Slightly less crude would be making a proper fixture file. Obviously a targeted test would be ideal.
The text was updated successfully, but these errors were encountered: