8000 gh-125028: Prohibit placeholders in partial keywords by dg-pb · Pull Request #126062 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-125028: Prohibit placeholders in partial keywords #126062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Prev Previous commit
Next Next commit
make test meaningful for ANY check
  • Loading branch information
dg-pb committed Jan 6, 2025
commit 5e151aaba749f62b080f063dc175d404dcf5c33b
3 changes: 2 additions & 1 deletion Lib/test/test_functools.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ def test_placeholders(self):
# thus unittest.mock.ANY isn't treated as Placeholder
p = self.partial(capture, unittest.mock.ANY)
actual_args, actual_kwds = p()
self.assertEqual(actual_args, (unittest.mock.ANY,))
self.assertEqual(len(actual_args), 1)
self.assertIs(actual_args[0], unittest.mock.ANY)
self.assertEqual(actual_kwds, {})

def test_placeholders_optimization(self):
Expand Down
Loading
0