From 4b2ad69b823542705de15dabcbd1fcd733a8fa6f Mon Sep 17 00:00:00 2001 From: Mahmoud Hashemi Date: Mon, 23 Mar 2020 11:54:15 -0700 Subject: [PATCH] test that method reassignment works --- tests/test_funcutils.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_funcutils.py b/tests/test_funcutils.py index a4b6793..783399d 100644 --- a/tests/test_funcutils.py +++ b/tests/test_funcutils.py @@ -34,6 +34,15 @@ def test_partials(): assert g.cached_partial_greet() == 'Hello...' assert CachedInstancePartial(g.greet, excitement='s')() == 'Hellos' + g.native_greet = 'native reassigned' + assert g.native_greet == 'native reassigned' + + g.partial_greet = 'partial reassigned' + assert g.partial_greet == 'partial reassigned' + + g.cached_partial_greet = 'cached_partial reassigned' + assert g.cached_partial_greet == 'cached_partial reassigned' + def test_copy_function(): def callee():