Commit 2ae3d5c1 authored by Hanno Schlichting's avatar Hanno Schlichting

Remove the ifmain blocks from tests

parent a172bbeb
......@@ -15,6 +15,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestNavigation),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -17,6 +17,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestPersistent),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -15,6 +15,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestUndoSupport),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -38,6 +38,3 @@ def test_suite():
return unittest.TestSuite((
DocTestSuite(),
))
if __name__ == '__main__':
unittest.main()
......@@ -105,101 +105,3 @@ http://www.zope.org/Members/michel/Projects/Interfaces/ObserverAndNotification
self._observers.remove( bozo )
except:
pass
#
# Unit tests
#
if __name__ == '__main__':
class DontGoHere( Exception ): pass
class Idawanna( Exception ): pass
class TestSubject( DefaultObservable ):
def __init__( self, paths ):
DefaultObservable.__init__( self, 0 )
self.paths = paths
def restrictedTraverse( self, path, default ):
return self.paths.get( path, default )
callbacks = {}
def recordCallback( name, subject, event ):
cbrec = callbacks.get( name, None )
if cbrec is None:
cbrec = callbacks[ name ] = []
cbrec.append( ( subject, event ) )
class TestObserver:
def __call__( self, subject, event ):
recordCallback( 'direct', subject, event )
def namedCallback( self, subject, event ):
recordCallback( 'named', subject, event )
def named2Callback( self, subject, event ):
recordCallback( 'named2', subject, event )
def boundCallback( self, subject, event ):
recordCallback( 'bound', subject, event )
def freefuncObserver( subject, event ):
recordCallback( 'freefunc', subject, event )
def tryVeto( subject, event ):
""" Simulate attempted veto. """
raise Idawanna
observer = TestObserver()
# Simulate Zope's path traversal mechanism.
paths = {}
paths[ 'direct' ] = observer
paths[ 'direct/named' ] = observer.namedCallback
paths[ 'direct/named2' ] = observer.named2Callback
paths[ 'bound' ] = observer.boundCallback
paths[ 'freefunc' ] = freefuncObserver
paths[ 'tryVeto' ] = tryVeto
subject = TestSubject( paths )
subject.registerObserver( 'direct' )
subject.registerObserver( 'bound' )
subject.registerObserver( 'direct/named' )
subject.registerObserver( ( 'direct', 'named2' ) )
subject.registerObserver( 'freefunc' )
subject.registerObserver( 'tryVeto' )
try:
subject.registerObserver( 'nonesuch' )
raise DontGoHere( 'path not found' )
except NameError:
pass
except:
import traceback
traceback.print_exc()
try:
subject.registerObserver( 3.1415926 )
raise DontGoHere( 'non-path' )
except TypeError:
pass
except:
import traceback
traceback.print_exc()
subject.notify( 'First event' )
subject.unregisterObserver( 'bound' )
subject.notify( { 'name' : 'Second event', 'value' : 42 } )
for key in callbacks.keys():
print '[%s]' % key
for cb in callbacks[ key ]:
print ' %s' % `cb`
......@@ -246,7 +246,3 @@ def test_suite():
suite.addTest(unittest.makeSuite(TestGetAttr_c))
suite.addTest(unittest.makeSuite(TestGetAttrAnonymous_c))
return suite
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -219,9 +219,3 @@ def test_suite():
suite = unittest.TestSuite()
suite.addTest( unittest.makeSuite( TestInitialization ) )
return suite
def main():
unittest.main(defaultTest='test_suite')
if __name__ == '__main__':
main()
......@@ -109,6 +109,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(ApplicationTests),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
import unittest
import Testing
import cStringIO
......@@ -526,6 +525,3 @@ def test_suite():
suite.addTest( unittest.makeSuite( TestCopySupport ) )
suite.addTest( unittest.makeSuite( TestCopySupportSecurity ) )
return suite
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -15,6 +15,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestFTPInterface),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -358,7 +358,3 @@ def test_suite():
unittest.makeSuite(FileTests),
unittest.makeSuite(ImageTests),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -15,6 +15,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestFindSupport),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -17,6 +17,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestFolder),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -461,6 +461,3 @@ def test_suite():
suite = unittest.TestSuite()
suite.addTest( unittest.makeSuite( ObjectManagerTests ) )
return suite
if __name__ == "__main__":
unittest.main()
......@@ -170,6 +170,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestOrderSupport),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -19,6 +19,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestOrderedFolder),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -160,6 +160,3 @@ def test_suite():
unittest.makeSuite(TestPropertyManager),
unittest.makeSuite(TestPropertySheet),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -358,9 +358,3 @@ def test_suite():
suite = unittest.TestSuite()
suite.addTest( unittest.makeSuite( TestRequestRange ) )
return suite
def main():
unittest.TextTestRunner().run(test_suite())
if __name__ == '__main__':
main()
......@@ -120,6 +120,3 @@ def test_suite():
unittest.makeSuite(TestItem_w__name__),
unittest.makeSuite(TestSimpleItem),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -422,11 +422,6 @@ class TestTraverse( unittest.TestCase ):
self.folder1.unrestrictedTraverse('+something') is 'plus')
import os, sys
if __name__ == '__main__':
execfile(os.path.join(sys.path[0], 'framework.py'))
class SimpleClass(object):
"""Class with no __bobo_traverse__."""
......@@ -685,6 +680,3 @@ def test_suite():
from Testing.ZopeTestCase import FunctionalDocTestSuite
suite.addTest( FunctionalDocTestSuite() )
return suite
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -42,6 +42,3 @@ def test_suite():
unittest.makeSuite(DTMLDocumentTests),
unittest.makeSuite(FactoryTests),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -52,6 +52,3 @@ def test_suite():
unittest.makeSuite(DTMLMethodTests),
unittest.makeSuite(FactoryTests),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -151,6 +151,3 @@ def test_suite():
def main():
unittest.main(defaultTest='test_suite')
if __name__ == '__main__':
main()
......@@ -194,6 +194,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(XMLExportImportTests),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -18,7 +18,6 @@ import unittest
from doctest import DocFileSuite
from Testing.ZopeTestCase import FunctionalDocFileSuite
__docformat__ = "reStructuredText"
def test_suite():
return unittest.TestSuite([
......@@ -26,6 +25,3 @@ def test_suite():
FunctionalDocFileSuite('makesite.txt',
package="Products.Five.component"),
])
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -79,6 +79,3 @@ def test_suite():
FunctionalDocFileSuite('README.txt'),
FunctionalDocFileSuite('directives.txt'),
])
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
#!/usr/bin/env python
"""Run all tests."""
import unittest
def test_suite():
suite = unittest.TestSuite()
for mname in ('DTMLTests', 'HTMLTests', 'Expressions', 'TALES'):
m = __import__('test' + mname)
suite.addTest(m.test_suite())
return suite
if __name__ == "__main__":
unittest.main(defaultTest='test_suite')
......@@ -188,6 +188,3 @@ class DTMLTests(zope.component.testing.PlacelessSetup, unittest.TestCase):
def test_suite():
return unittest.makeSuite(DTMLTests, 'check')
if __name__=='__main__':
main()
......@@ -54,7 +54,3 @@ class MiscTests(unittest.TestCase):
def test_suite():
return unittest.makeSuite(MiscTests)
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -502,7 +502,3 @@ def test_suite():
suite.addTests(unittest.makeSuite(ZPTUnicodeEncodingConflictResolution))
suite.addTests(unittest.makeSuite(PreferredCharsetUnicodeResolverTests))
return suite
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -215,6 +215,3 @@ def test_suite():
unittest.makeSuite(LineEndingsTestCase),
unittest.makeSuite(LazyLoadingTestCase),
))
if __name__ == "__main__":
unittest.main(defaultTest="test_suite")
......@@ -10,39 +10,26 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
import sys, os, time
if __name__ == "__main__":
sys.path.insert(0, '../../..')
#os.chdir('../../..')
import time
from Testing import makerequest
import ZODB # in order to get Persistence.Persistent working
import transaction
import Acquisition
from Acquisition import aq_base
from Products.Sessions.BrowserIdManager import BrowserIdManager, \
getNewBrowserId
from Products.Sessions.SessionDataManager import \
SessionDataManager, SessionDataManagerErr
SessionDataManager
from Products.Transience.Transience import \
TransientObjectContainer, TransientObject
TransientObjectContainer
from Products.TemporaryFolder.TemporaryFolder import MountedTemporaryFolder
from Products.TemporaryFolder.LowConflictConnection import \
LowConflictConnection
from ZODB.Connection import Connection
from ZODB.POSException import InvalidObjectReference, ConflictError, \
from ZODB.POSException import ConflictError, \
ReadConflictError, BTreesConflictError
from DateTime import DateTime
from unittest import TestCase, TestSuite, TextTestRunner, makeSuite
import time, threading, random
from cPickle import UnpickleableError
from unittest import TestCase, TestSuite, makeSuite
import threading, random
from ZODB.DemoStorage import DemoStorage
from tempstorage.TemporaryStorage import TemporaryStorage
from OFS.Application import Application
from OFS.Folder import Folder
import sys
import time
import traceback
sys.setcheckinterval(200)
from Products.Transience.tests import fauxtime
import Products.Transience.Transience
......@@ -261,7 +248,3 @@ def test_suite():
test_multithread = makeSuite(TestMultiThread, 'test')
suite = TestSuite((test_multithread,))
return suite
if __name__ == '__main__':
runner = TextTestRunner(verbosity=9, descriptions=9)
runner.run(test_suite())
......@@ -152,7 +152,3 @@ def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(SiteErrorLogTests))
return suite
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -145,6 +145,3 @@ def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestZReST))
return suite
if __name__ == '__main__':
unittest.main(defaultSuite='test_suite')
......@@ -595,102 +595,3 @@ class xmlPickler(NoBlanks, xyap):
'persistent': save_persis,
'unicode': save_unicode,
}
# The rest is used for testing only
class C:
def __cmp__(self, other):
return cmp(self.__dict__, other.__dict__)
def test():
import xmllib
import pickle
c = C()
c.foo = 1
c.bar = 2
x = [0, 1, 2, 3]
y = ('abc', 'abc', c, c)
x.append(y)
x.append(y)
t = ()
l = []
s = ''
L = long('999999999999')
x.append(t)
x.append(l)
x.append(s)
x.append(L)
x.append(55555)
x.append(13)
r = [x]
print x
f = pickle.dumps(x)
print f
r.append(f)
q = ToXMLloads(f)
q = str(q)
q = '<?xml version="1.0"?>\n' + q
print q
r.append(q)
F = xmlPickler()
F.binary = 1
p = xmllib.XMLParser()
p.start_handlers = F.start_handlers
p.end_handlers = F.end_handlers
p.handle_data = F.handle_data
p.unknown_starttag = F.unknown_starttag
p.unknown_endtag = F.unknown_endtag
p._stack = F._stack
p.push = F.push
p.append = F.append
data = q.split('\n')
for l in data:
p.feed(l)
p.close()
z = p._stack
z = z[0][0]
print z, '\n'
r.append(z)
l = pickle.loads(z)
print l, '\n'
r.append(l)
def test1():
import xml.parsers.expat
import pickle
c = C()
c.foo = 1
c.bar = 2
x = [0, 1, 2, 3]
y = ('abc', 'abc', c, c)
x.append(y)
x.append(y)
t = ()
l = []
s = ''
L = long('999999999999')
x.append(t)
x.append(l)
x.append(s)
x.append(L)
x.append(5)
x.append(13)
print x, '\n'
f = pickle.dumps(x)
print f, '\n'
q = ToXMLloads(f)
q = str(q)
q = '<?xml version="1.0"?>\n' + q
print q, '\n'
F = xmlPickler()
F.binary = 0
p = xml.parsers.expat.ParserCreate()
p.CharacterDataHandler = F.handle_data
p.StartElementHandler = F.unknown_starttag
p.EndElementHandler = F.unknown_endtag
r = p.Parse(q)
print r, '\n'
if __name__ == '__main__':
test()
......@@ -22,8 +22,6 @@ Oh well.
import string
import xml.parsers.expat
from pickle import *
class xyap:
start_handlers = {}
......@@ -117,57 +115,3 @@ class xmlrpc(NoBlanks, XYap):
'array': lambda self, tag, data: data[2],
'data': lambda self, tag, data: data[2:],
}
def test():
data = """<?xml version="1.0"?>
<methodCall>
<methodName>examples.getStateName
</methodName>
<params>
<param>
<value><i4>41</i4></value>
</param>
<param><value>
<struct>
<member>
<name>lowerBound</name>
<value><i4>18</i4></value>
</member>
<member>
<name>upperBound</name>
<value><i4>139</i4></value>
</member>
</struct></value>
</param>
<param><value>
<array>
<data>
<value><i4>12</i4></value>
<value><string>Egypt</string></value>
<value><boolean>0</boolean></value>
<value><i4>-31</i4></value>
</data>
</array></value>
</param>
</params>
</methodCall>
"""
data = data.split('\n')
r = []
for C in XYap, xmlrpc:
p = C()
for l in data:
p.feed(l)
p.close()
r.append(p._stack)
return r
if __name__=='__main__':
print test()
......@@ -56,10 +56,6 @@ and turn them into tests:
``FunctionalDocFileSuite`` and instantiate it, passing the name of the
text file containing the test. For example:
import os, sys
if __name__ == '__main__':
execfile(os.path.join(sys.path[0], 'framework.py'))
from unittest import TestSuite
from Testing.ZopeTestCase import FunctionalDocFileSuite
......@@ -68,9 +64,6 @@ and turn them into tests:
FunctionalDocFileSuite('FunctionalDocTest.txt'),
))
if __name__ == '__main__':
framework()
Examples
--------
......
......@@ -26,10 +26,6 @@ infrastructure to set up the necessary environment.
passing the name of the text file containing the tests.
For example:
import os, sys
if __name__ == '__main__':
execfile(os.path.join(sys.path[0], 'framework.py'))
from unittest import TestSuite
from Testing.ZopeTestCase import ZopeDocFileSuite
......@@ -38,9 +34,6 @@ infrastructure to set up the necessary environment.
ZopeDocFileSuite('ZopeDocTest.txt'),
))
if __name__ == '__main__':
framework()
Examples
--------
......
......@@ -2,14 +2,6 @@
import unittest
TestRunner = unittest.TextTestRunner
def framework():
if __name__ != '__main__':
return
if len(sys.argv) > 1:
errs = globals()[sys.argv[1]]()
else:
errs = TestRunner().run(test_suite())
sys.exit(errs and 1 or 0)
def debug():
test_suite().debug()
......@@ -41,8 +33,3 @@ class Dummy:
return 'Dummy(%s)' % `self.__dict__`
__repr__ = __str__
def Testing_file(*args):
dir = os.path.split(Testing.__file__)[0]
return apply(os.path.join, (dir,) + args)
......@@ -62,6 +62,3 @@ def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(MakerequestTests))
return suite
if __name__=='__main__':
unittest.TextTestRunner().run(test_suite())
......@@ -705,6 +705,3 @@ def test_suite():
unittest.makeSuite(TestBaseRequest),
unittest.makeSuite(TestBaseRequestZope3Views),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -136,9 +136,3 @@ def debug():
def pdebug():
import pdb
pdb.run('debug()')
if __name__=='__main__':
if len(sys.argv) > 1:
globals()[sys.argv[1]]()
else:
main()
......@@ -1068,6 +1068,3 @@ def test_suite():
suite.addTest(unittest.makeSuite(RecordTests))
suite.addTest(unittest.makeSuite(HTTPRequestTests))
return suite
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -10,9 +10,3 @@ def test_suite():
suite = unittest.TestSuite()
suite.addTest( unittest.makeSuite( TestFileStreamIterator ) )
return suite
def main():
unittest.main(defaultTest='test_suite')
if __name__ == '__main__':
main()
......@@ -137,6 +137,3 @@ class TestBaseRequestPT(TestCase):
def test_suite():
return TestSuite( ( makeSuite(TestBaseRequestPT), ) )
if __name__ == '__main__':
main(defaultTest='test_suite')
......@@ -110,9 +110,5 @@ class ConvertersTests(unittest.TestCase):
self.assertEqual(field2ulines(to_convert), to_convert.splitlines())
def test_suite():
return unittest.TestSuite((unittest.makeSuite(ConvertersTests),))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -45,6 +45,3 @@ def test_suite():
'ExceptionRaiser2': ExceptionRaiser2,
'ExceptionRaiser3': ExceptionRaiser3,}),
])
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -212,6 +212,3 @@ class XMLRPCResponseTests(unittest.TestCase):
def test_suite():
return unittest.TestSuite((unittest.makeSuite(XMLRPCResponseTests),))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
import unittest
import time
from StringIO import StringIO
from ZServer import ClockServer
class DummyLogger:
def __init__(self):
self.L = []
......@@ -14,6 +14,7 @@ class DummyLogger:
def read(self):
return ' '.join(self.L)
class LogHelperTests(unittest.TestCase):
def _getTargetClass(self):
return ClockServer.LogHelper
......@@ -22,13 +23,13 @@ class LogHelperTests(unittest.TestCase):
return self._getTargetClass()(*arg, **kw)
def test_helper(self):
from StringIO import StringIO
logger = DummyLogger()
helper = self._makeOne(logger)
self.assertEqual(helper.logger, logger)
logger.log('ip', 'msg', foo=1, bar=2)
self.assertEqual(logger.read(), 'ip msg')
class ClockServerTests(unittest.TestCase):
def _getTargetClass(self):
return ClockServer.ClockServer
......@@ -151,6 +152,3 @@ def test_suite():
suite = unittest.makeSuite(ClockServerTests)
suite.addTest(unittest.makeSuite(LogHelperTests))
return suite
if __name__ == "__main__":
unittest.main(defaultTest="test_suite")
......@@ -293,6 +293,3 @@ def test_suite():
suite = unittest.makeSuite(ZServerConfigurationTestCase)
suite.addTest(unittest.makeSuite(MonitorServerConfigurationTestCase))
return suite
if __name__ == "__main__":
unittest.main(defaultTest="test_suite")
......@@ -308,6 +308,3 @@ def test_suite():
unittest.makeSuite(ZServerHTTPResponseEventsTestCase)
))
return suite
if __name__ == "__main__":
unittest.main(defaultTest="test_suite")
#!/usr/bin/env python
"""Run all tests."""
import unittest
import glob
import os
import sys
def test_suite():
suite = unittest.TestSuite()
for mname in glob.glob(os.path.join(sys.path[0], 'test*.py')):
mname = os.path.split(mname)[1][:-3]
m = __import__(mname)
suite.addTest(m.test_suite())
return suite
if __name__ == "__main__":
unittest.main(defaultTest='test_suite')
import os, sys
from unittest import TestCase, makeSuite
from unittest import TestCase, makeSuite, main
import string
from ZTUtils import Batch
class BatchTests(TestCase):
......@@ -50,6 +47,3 @@ class BatchTests(TestCase):
def test_suite():
return makeSuite(BatchTests)
if __name__=='__main__':
main()
......@@ -214,7 +214,7 @@ class TreeTests(unittest.TestCase):
def testDecodeDecompressedSizeLimit(self):
import zlib
from ZTUtils.Tree import b2a, a2b, encodeExpansion, decodeExpansion
from ZTUtils.Tree import b2a
big = b2a(zlib.compress('x' * (1024*1100)))
self.assert_(len(big) < 8192) # Must be under the input size limit
self.assertRaises(ValueError, Tree.decodeExpansion, ':' + big)
......@@ -222,6 +222,3 @@ class TreeTests(unittest.TestCase):
def test_suite():
return unittest.makeSuite(TreeTests)
if __name__=='__main__':
unittest.main()
import os, sys
from unittest import TestCase, makeSuite
from unittest import TestCase, makeSuite, main
import string
import urllib
from ZTUtils.Zope import make_query, complex_marshal
from ZTUtils.Zope import make_hidden_input
......@@ -66,6 +63,3 @@ class QueryTests(TestCase):
def test_suite():
return makeSuite(QueryTests)
if __name__=='__main__':
main()
......@@ -411,6 +411,3 @@ def test_suite():
suite.addTest(unittest.makeSuite(ExceptionMessageRenderTest))
suite.addTest(unittest.makeSuite(ExceptionViewsTest))
return suite
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -397,6 +397,3 @@ class ZopeStarterTestCase(test_logger.LoggingTestBase):
def test_suite():
return unittest.makeSuite(ZopeStarterTestCase)
if __name__ == "__main__":
unittest.main(defaultTest="test_suite")
......@@ -223,6 +223,3 @@ class StartupTestCase(unittest.TestCase):
def test_suite():
return unittest.makeSuite(StartupTestCase)
if __name__ == "__main__":
unittest.main(defaultTest="test_suite")
......@@ -125,6 +125,3 @@ class TestWarnFilter(unittest.TestCase):
def test_suite():
return unittest.makeSuite(TestWarnFilter)
if __name__ == "__main__":
unittest.main(defaultTest="test_suite")
......@@ -15,6 +15,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestCollection),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -15,6 +15,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestEtagSupport),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -14,6 +14,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestLockItem),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -34,6 +34,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestUtilFunctions),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -81,6 +81,3 @@ def test_suite():
unittest.makeSuite(TestLockNullResource),
unittest.makeSuite(TestNullResource),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -90,6 +90,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestPUTFactory),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -282,6 +282,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestResource),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -84,7 +84,3 @@ def test_suite():
unittest.makeSuite(TestUnlock),
unittest.makeSuite(TestPropPatch),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -31,6 +31,3 @@ def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestNode),
))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment