diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-12-09 10:59:50 -0500 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-12-09 10:59:50 -0500 |
commit | cc5097e82156c35c21ab2ecfbad1d326bf9c5459 (patch) | |
tree | 8542751f1fb0c97c1cee67fcaa58ab8a863cfdd2 | |
parent | 2a0da34c131bbe1c8633875956b4cb28187b4f66 (diff) | |
download | six-cc5097e82156c35c21ab2ecfbad1d326bf9c5459.tar.gz |
add test for issue #105
-rw-r--r-- | test_six.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test_six.py b/test_six.py index b0ccd8d..d5555e8 100644 --- a/test_six.py +++ b/test_six.py @@ -701,6 +701,18 @@ def test_wraps(): assert k is original_k assert not hasattr(k, '__wrapped__') + def f(g, assign, update): + def w(): + return 42 + w.glue = {"foo" : "bar"} + return six.wraps(g, assign, update)(w) + k.glue = {"melon" : "egg"} + k.turnip = 43 + k = f(k, ["turnip"], ["glue"]) + assert k.__name__ == "w" + assert k.turnip == 43 + assert k.glue == {"melon" : "egg", "foo" : "bar"} + def test_add_metaclass(): class Meta(type): |