Skip to content

Commit 0bebeec

Browse files
committed
Fix AttributeError test in test_exceptions
1 parent 944c632 commit 0bebeec

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/test/test_exceptions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,16 +2072,16 @@ def __getattr__(self, attr):
20722072
# Provide no message.
20732073
raise AttributeError
20742074

2075-
A.bluch
2075+
A().bluch
20762076

20772077
try:
20782078
f()
20792079
except AttributeError:
20802080
with support.captured_stderr() as err:
20812081
sys.__excepthook__(*sys.exc_info())
20822082

2083-
# 'bluch' should appear even when message was empty.
2084-
self.assertIn("'bluch'", err.getvalue())
2083+
# Should appear even when no message was provided.
2084+
self.assertIn("'A' object has no attribute 'bluch'", err.getvalue())
20852085

20862086
# Note: name suggestion tests live in `test_traceback`.
20872087

0 commit comments

Comments
 (0)