Opened 5 years ago

Closed 5 years ago

#15703 closed (fixed)

Testsuite failure: django.utils.datastructures

Reported by: mk 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: UI/UX:


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 5 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 5 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

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