diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2021-04-12 14:52:09 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2021-04-12 14:52:09 +0200 |
commit | 5704109b327591dde14cbc23ce532cdbd16d84c6 (patch) | |
tree | 0032ef3c27951b615ffb23ca1410fb3b9dd47842 | |
parent | 8cef4203124241911f63dc171f5536665f324507 (diff) | |
download | cython-5704109b327591dde14cbc23ce532cdbd16d84c6.tar.gz |
Extend a test.
-rw-r--r-- | tests/run/kwargs_passthrough.pyx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/run/kwargs_passthrough.pyx b/tests/run/kwargs_passthrough.pyx index 704638a55..99368859c 100644 --- a/tests/run/kwargs_passthrough.pyx +++ b/tests/run/kwargs_passthrough.pyx @@ -139,6 +139,18 @@ def wrap_modify_mix(f): >>> wrapped(a=2, test=3) CALLED (2, 1) + + >>> def py_modify(**kwargs): + ... print(kwargs) + ... kwargs['new'] = len(kwargs) + ... return kwargs + + >>> wrapped_modify = wrap_modify_mix(py_modify) + >>> wrapped_modify(a=1) + CALLED + {'a': 1} + {'a': 1, 'test': 1} + {'a': 1, 'test': 1, 'new': 2} """ def wrapper(*args, **kwargs): print("CALLED") |