summaryrefslogtreecommitdiffstatshomepage
path: root/tests/stress/dict_copy.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-03-15 13:20:18 +0000
committerDamien George <damien.p.george@gmail.com>2016-03-15 13:20:18 +0000
commit157056ecdf378898996ba095c3d7bcf625368103 (patch)
tree21f508f1ba8ab951b3acb59605d23825778b6dc9 /tests/stress/dict_copy.py
parentab69ed7dac1bf0ef36238b6289d436e9932180bc (diff)
downloadmicropython-157056ecdf378898996ba095c3d7bcf625368103.tar.gz
micropython-157056ecdf378898996ba095c3d7bcf625368103.zip
tests: Add new subdir "stress/" specifically for stress tests.
Diffstat (limited to 'tests/stress/dict_copy.py')
-rw-r--r--tests/stress/dict_copy.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/stress/dict_copy.py b/tests/stress/dict_copy.py
new file mode 100644
index 0000000000..36db9bb7e8
--- /dev/null
+++ b/tests/stress/dict_copy.py
@@ -0,0 +1,7 @@
+# copying a large dictionary
+
+a = {i:2*i for i in range(1000)}
+b = a.copy()
+for i in range(1000):
+ print(i, b[i])
+print(len(b))