From: Mike C. F. <mcf...@us...> - 2010-03-30 15:46:03
|
Update of /cvsroot/pydispatcher/pydispatch/tests In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv29940/tests Modified Files: test_saferef.py Removed Files: test.py Log Message: Move to a more standard package layout with sub-package of the code to install. Make tests compatible with nosetest discovery. Make tests *not* install by default. Index: test_saferef.py =================================================================== RCS file: /cvsroot/pydispatcher/pydispatch/tests/test_saferef.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** test_saferef.py 7 Jul 2006 15:59:38 -0000 1.1.1.1 --- test_saferef.py 30 Mar 2010 15:45:55 -0000 1.2 *************** *** 2,11 **** import unittest ! class Test1( object): def x( self ): pass ! def test2(obj): pass ! class Test2( object ): def __call__( self, obj ): pass --- 2,11 ---- import unittest ! class T1( object): def x( self ): pass ! def t2(obj): pass ! class T2( object ): def __call__( self, obj ): pass *************** *** 15,26 **** ss = [] for x in xrange( 5000 ): ! t = Test1() ts.append( t) s = safeRef(t.x, self._closure ) ss.append( s) ! ts.append( test2 ) ! ss.append( safeRef(test2, self._closure) ) for x in xrange( 30 ): ! t = Test2() ts.append( t) s = safeRef(t, self._closure ) --- 15,26 ---- ss = [] for x in xrange( 5000 ): ! t = T1() ts.append( t) s = safeRef(t.x, self._closure ) ss.append( s) ! ts.append( t2 ) ! ss.append( safeRef(t2, self._closure) ) for x in xrange( 30 ): ! t = T2() ts.append( t) s = safeRef(t, self._closure ) *************** *** 57,61 **** """ repr( self.ss[-1] ) ! def test(self): self.closureCount = 0 --- 57,61 ---- """ repr( self.ss[-1] ) ! def test(self): self.closureCount = 0 *************** *** 65,69 **** if wholeI-i != self.closureCount: """Unexpected number of items closed, expected %s, got %s closed"""%( wholeI-i,self.closureCount) ! def _closure(self, ref): """Dumb utility mechanism to increment deletion counter""" --- 65,69 ---- if wholeI-i != self.closureCount: """Unexpected number of items closed, expected %s, got %s closed"""%( wholeI-i,self.closureCount) ! def _closure(self, ref): """Dumb utility mechanism to increment deletion counter""" --- test.py DELETED --- |