Skip to content

Commit

Permalink
test for inplace pluckable
Browse files Browse the repository at this point in the history
  • Loading branch information
randomir committed May 2, 2017
1 parent 9483c2a commit a4092d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_pluckable.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit a4092d5

Please sign in to comment.