Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Check ^ location
  • Loading branch information
sobolevn committed Aug 29, 2024
commit 7b094c34094746b0894d31b679be1a43cc98e7b2
17 changes: 17 additions & 0 deletions Lib/test/test_syntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -2800,6 +2800,23 @@ def test_deep_invalid_rule(self):
with self.assertRaises(SyntaxError):
compile(source, "<string>", "exec")

def test_except_stmt_invalid_as_expr(self):
self._check_error(
textwrap.dedent(
"""
try:
pass
except ValueError as obj.attr:
pass
"""
),
errtext="cannot use except statement with attribute",
lineno=4,
end_lineno=4,
offset=22,
end_offset=22 + len("obj.attr"),
)


def load_tests(loader, tests, pattern):
tests.addTest(doctest.DocTestSuite())
Expand Down