From 1d557616b11aa356db203bfa4504275dda995374 Mon Sep 17 00:00:00 2001 From: Luis Moreno Date: Fri, 19 Jun 2020 15:13:01 -0400 Subject: [PATCH] Fix test for python3.8 --- common/lib/capa/capa/safe_exec/tests/test_safe_exec.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/lib/capa/capa/safe_exec/tests/test_safe_exec.py b/common/lib/capa/capa/safe_exec/tests/test_safe_exec.py index 147ef5208c..15e37e869b 100644 --- a/common/lib/capa/capa/safe_exec/tests/test_safe_exec.py +++ b/common/lib/capa/capa/safe_exec/tests/test_safe_exec.py @@ -199,7 +199,10 @@ class TestUpdateHash(unittest.TestCase): """ d1 = {k: 1 for k in "abcdefghijklmnopqrstuvwxyz"} - d2 = dict(d1) + d2 = {k: 1 for k in "bcdefghijklmnopqrstuvwxyza"} + # TODO: remove the next lines once we are in python3.8 + # since python3.8 dict preserve the order of insertion + # and therefore d2 and d1 keys are already in different order. for i in range(10000): d2[i] = 1 for i in range(10000):