Skip to content

Commit

Permalink
Fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed May 29, 2024
1 parent 1dfd02b commit daba318
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Lib/test/test_dis.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def wrap_func_w_kwargs():
CALL 1
STORE_SUBSCR
2 LOAD_CONST 2 (<code object <annotations of top> at 0x..., file "<dis>", line 2>)
2 LOAD_CONST 2 (<code object __annotate__ at 0x..., file "<dis>", line 2>)
MAKE_FUNCTION
STORE_NAME 3 (__annotate__)
RETURN_CONST 3 (None)
Expand Down
2 changes: 2 additions & 0 deletions Lib/test/test_pyclbr.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ def ismethod(oclass, obj, name):

actualMethods = []
for m in py_item.__dict__.keys():
if m == "__annotate__":
continue
if ismethod(py_item, getattr(py_item, m), m):
actualMethods.append(m)
foundMethods = []
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_pydoc/test_pydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class A(builtins.object)
class B(builtins.object)
| Methods defined here:
|
| __annotate__ = <annotations of B>(...)
| __annotate__(...)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
Expand Down Expand Up @@ -179,7 +179,7 @@ class A(builtins.object)
class B(builtins.object)
Methods defined here:
__annotate__ = (...)
__annotate__(...)
----------------------------------------------------------------------
Data descriptors defined here:
__dict__
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ def foo(a: THIS_DOES_NOT_EXIST ) -> int:
' ~~~~~~~~^^\n'
f' File "{__file__}", line {lineno_f+3}, in f_with_type\n'
' foo.__annotations__\n'
f' File "{__file__}", line {lineno_f+1}, in <annotations of foo>\n'
f' File "{__file__}", line {lineno_f+1}, in __annotate__\n'
' def foo(a: THIS_DOES_NOT_EXIST ) -> int:\n'
' ^^^^^^^^^^^^^^^^^^^\n'
)
Expand Down

0 comments on commit daba318

Please sign in to comment.