We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 542a3c3 commit b4cf877Copy full SHA for b4cf877
test_jsonstore.py
@@ -284,6 +284,18 @@ def test_transaction_write(self):
284
with open(self._store_file) as handle:
285
self.assertEqual(handle.read(), '{"value1": 1, "value2": 2}')
286
287
+ def test_list_concat_inplace(self):
288
+ self.store.list = []
289
+ extension = [{"key": "value"}]
290
+
291
+ # make sure += happens
292
+ self.store["list"] += extension
293
+ self.store.list += extension
294
+ self.assertEqual(self.store.list, extension * 2)
295
296
+ # make sure a deepcopy occurred
297
+ self.assertIsNot(self.store.list[0], extension[0])
298
299
300
if __name__ == "__main__":
301
unittest.main()
0 commit comments