mirror of https://github.com/django/django.git
Fix the dispatch tests on python 2.5
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16977 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
d362c1546f
commit
b7845768cb
|
@ -4,5 +4,5 @@ Unit-tests for the dispatch project
|
|||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from .test_saferef import *
|
||||
from .test_dispatcher import *
|
||||
from .test_dispatcher import DispatcherTests
|
||||
from .test_saferef import SaferefTests
|
||||
|
|
|
@ -116,9 +116,3 @@ class DispatcherTests(unittest.TestCase):
|
|||
garbage_collect()
|
||||
a_signal.disconnect(receiver_3)
|
||||
self._testIsClean(a_signal)
|
||||
|
||||
def getSuite():
|
||||
return unittest.makeSuite(DispatcherTests,'test')
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
@ -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 @@ class Tester(unittest.TestCase):
|
|||
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 @@ class Tester(unittest.TestCase):
|
|||
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 @@ class Tester(unittest.TestCase):
|
|||
|
||||
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
|
Loading…
Reference in New Issue