FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-125028: Prohibit placeholders in partial keywords by dg-pb · Pull Request #126062 · python/cpython · GitHub

Repository navigation

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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
Comment thread
dg-pb marked this conversation as resolved.
Outdated
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

Back | FazBrowse Home | New Git URL