Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix the dispatch tests on python 2.5

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16977 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b7845768cbfaf408b22a48e41d406f7135fe9729 1 parent d362c15
@alex alex authored
View
4 tests/regressiontests/dispatch/tests/__init__.py
@@ -4,5 +4,5 @@
from __future__ import absolute_import
-from .test_saferef import *
-from .test_dispatcher import *
+from .test_dispatcher import DispatcherTests
+from .test_saferef import SaferefTests
View
6 tests/regressiontests/dispatch/tests/test_dispatcher.py
@@ -116,9 +116,3 @@ def testDisconnection(self):
garbage_collect()
a_signal.disconnect(receiver_3)
self._testIsClean(a_signal)
-
-def getSuite():
- return unittest.makeSuite(DispatcherTests,'test')
-
-if __name__ == "__main__":
- unittest.main()
View
14 tests/regressiontests/dispatch/tests/test_saferef.py
@@ -13,7 +13,7 @@ class Test2(object):
def __call__(self, obj):
pass
-class Tester(unittest.TestCase):
+class SaferefTests(unittest.TestCase):
def setUp(self):
ts = []
ss = []
@@ -47,7 +47,7 @@ def testValid(self):
for s in self.ss:
self.assertTrue(s())
- def testShortCircuit (self):
+ def testShortCircuit(self):
"""Test that creation short-circuits to reuse existing references"""
sd = {}
for s in self.ss:
@@ -60,7 +60,7 @@ def testShortCircuit (self):
self.assertTrue(sd.has_key(safeRef(t)))
self.assertTrue(safeRef(t) in sd)
- def testRepresentation (self):
+ def testRepresentation(self):
"""Test that the reference object's representation works
XXX Doesn't currently check the results, just that no error
@@ -70,10 +70,4 @@ def testRepresentation (self):
def _closure(self, ref):
"""Dumb utility mechanism to increment deletion counter"""
- self.closureCount +=1
-
-def getSuite():
- return unittest.makeSuite(Tester,'test')
-
-if __name__ == "__main__":
- unittest.main()
+ self.closureCount +=1
Please sign in to comment.
Something went wrong with that request. Please try again.