Opened 8 years ago

Closed 8 years ago

#15703 closed (fixed)

Testsuite failure: django.utils.datastructures

Reported by: Matthias Kestenholz Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


The test in tests/regressiontests/utils/datastructures fails since yesterday with the following error:

ERROR: test_copy (regressiontests.utils.datastructures.MultiValueDictTests)
Traceback (most recent call last):
  File "/Users/mk/Projects/django/tests/regressiontests/utils/", line 222, in test_copy
    d2 = copy_func(d1)
TypeError: 'module' object is not callable

The testsuite is easily fixed by the following patch:

diff --git a/tests/regressiontests/utils/ b/tests/regressiontests/utils/
index 6ae652c..3ef1342 100644
--- a/tests/regressiontests/utils/
+++ b/tests/regressiontests/utils/
@@ -214,7 +214,7 @@ class MultiValueDictTests(DatastructuresTestCase):
                           ['Developer', 'Simon', 'Willison'])
     def test_copy(self):
-        for copy_func in [copy, lambda d: d.copy()]:
+        for copy_func in [copy.copy, lambda d: d.copy()]:
             d1 = MultiValueDict({
                 "developers": ["Carl", "Fred"]

Change History (2)

comment:1 Changed 8 years ago by Russell Keith-Magee

Triage Stage: UnreviewedReady for checkin

comment:2 Changed 8 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

In [15936]:

Fixed #15703 -- Corrected problem in test suite introduced by Python 2.4 changes from r15927. Thanks to mk for the report and patch.

Note: See TracTickets for help on using tickets.
Back to Top