Skip to content

Commit

Permalink
Don't use OrderedCode.qualname in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
rchen152 committed Mar 11, 2024
1 parent 56aaf9a commit b63e7df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytype/rewrite/abstract/functions_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def f(x, /, *args, y, **kwargs):
pass
""")
func_code = module_code.consts[0]
signature = functions.Signature.from_code(func_code.qualname, func_code)
signature = functions.Signature.from_code('f', func_code)
self.assertEqual(repr(signature), 'def f(x, /, *args, y, **kwargs)')

def test_map_args(self):
Expand All @@ -38,7 +38,7 @@ def f(x, /, *args, y, **kwargs):
""")
func_code = module_code.consts[0]
f = functions.InterpreterFunction(
name=func_code.qualname, code=func_code, enclosing_scope=())
name='f', code=func_code, enclosing_scope=())
self.assertEqual(len(f.signatures), 1)
self.assertEqual(repr(f.signatures[0]), 'def f(x, /, *args, y, **kwargs)')

Expand Down

0 comments on commit b63e7df

Please sign in to comment.