From a4092d5a2106eb460d834bb669e5cb28609ad118 Mon Sep 17 00:00:00 2001 From: Radomir Stevanovic Date: Tue, 2 May 2017 11:05:24 +0200 Subject: [PATCH] test for inplace pluckable --- tests/test_pluckable.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_pluckable.py b/tests/test_pluckable.py index 794a16e..cabaff7 100755 --- a/tests/test_pluckable.py +++ b/tests/test_pluckable.py @@ -177,5 +177,11 @@ def test_dict_slice_step_from_one(self): def test_dict_slice_reduced_to_scalar_result(self): self.assertEqual(pluckable({0: 0, 1: 1, 4: 4})[1::2].value, 1) + def test_inplace(self): + p = pluckable(self.src, inplace=True) + p2 = p.c.I.b + self.assertEqual(id(p), id(p2)) + self.assertEqual(p2.obj, 2) + if __name__ == '__main__': unittest.main()