[utils] Apply partial_application decorator to existing functions

Thx: yt-dlp/yt-dlp#10653 (etc)
This commit is contained in:
dirkf
2025-11-01 20:35:11 +00:00
parent 23a848c314
commit a9b4649d92
2 changed files with 9 additions and 2 deletions

View File

@@ -1730,13 +1730,13 @@ Line 1
callable(test_fn(kwarg=10)),
'missing positional parameter should apply partially')
self.assertEqual(
test_fn(10, kwarg=0.1), '10, kwarg=0.1',
test_fn(10, kwarg=42), '10, kwarg=42',
'positionally passed argument should call function')
self.assertEqual(
test_fn(x=10), '10, kwarg=None',
'keyword passed positional should call function')
self.assertEqual(
test_fn(kwarg=0.1)(10), '10, kwarg=0.1',
test_fn(kwarg=42)(10), '10, kwarg=42',
'call after partial application should call the function')