Skip to content

Commit

Permalink
unittest.mock.ANY test for Placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
dg-pb committed Jun 25, 2024
1 parent 266b4fa commit dd58a12
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Lib/test/test_inspect/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -3322,6 +3322,12 @@ def test(a, b, *, c, d):
('d', ..., ..., "keyword_only")),
...))

# Ensure unittest.mock.ANY & similar do not get picked up as a Placeholder
self.assertEqual(self.signature(partial(test, unittest.mock.ANY, 1, c=2)),
((('c', 2, ..., "keyword_only"),
('d', ..., ..., "keyword_only")),
...))

def test(a, *args, b, **kwargs):
pass

Expand Down

0 comments on commit dd58a12

Please sign in to comment.