Commit 8409e276 authored by Nicolas Delaby's avatar Nicolas Delaby

Tests must be only started with runCloudOOoUnitTest.py .

Otherwise argument handling is messy and processes
are not well stopped.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@42061 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 71237ad0
...@@ -95,9 +95,3 @@ class TestAllFormats(CloudoooTestCase): ...@@ -95,9 +95,3 @@ class TestAllFormats(CloudoooTestCase):
def test_suite(): def test_suite():
return make_suite(TestAllFormats) return make_suite(TestAllFormats)
if __name__ == "__main__":
import sys
from cloudoooTestCase import loadConfig
loadConfig(sys.argv[1])
suite = unittest.TestLoader().loadTestsFromTestCase(TestAllFormats)
unittest.TextTestRunner(verbosity=2).run(suite)
...@@ -72,9 +72,3 @@ class TestHighLoad(CloudoooTestCase): ...@@ -72,9 +72,3 @@ class TestHighLoad(CloudoooTestCase):
def test_suite(): def test_suite():
return make_suite(TestHighLoad) return make_suite(TestHighLoad)
if __name__ == "__main__":
import sys
from cloudoooTestCase import loadConfig
loadConfig(sys.argv[1])
suite = unittest.TestLoader().loadTestsFromTestCase(TestHighLoad)
unittest.TextTestRunner(verbosity=2).run(suite)
...@@ -358,10 +358,3 @@ class TestMimeMapper(CloudoooTestCase): ...@@ -358,10 +358,3 @@ class TestMimeMapper(CloudoooTestCase):
def test_suite(): def test_suite():
return make_suite(TestMimeMapper) return make_suite(TestMimeMapper)
if '__main__' == __name__:
from cloudoooTestCase import startFakeEnvironment, stopFakeEnvironment
startFakeEnvironment()
suite = unittest.TestLoader().loadTestsFromTestCase(TestMimeMapper)
unittest.TextTestRunner(verbosity=2).run(suite)
stopFakeEnvironment()
...@@ -74,9 +74,3 @@ class TestMonitorInit(CloudoooTestCase): ...@@ -74,9 +74,3 @@ class TestMonitorInit(CloudoooTestCase):
def test_suite(): def test_suite():
return make_suite(TestMonitorInit) return make_suite(TestMonitorInit)
if "__main__" == __name__:
import sys
from cloudoooTestCase import loadConfig
loadConfig(sys.argv[1])
suite = unittest.TestLoader().loadTestsFromTestCase(TestMonitorInit)
unittest.TextTestRunner(verbosity=2).run(suite)
...@@ -108,9 +108,3 @@ class TestMonitorMemory(unittest.TestCase): ...@@ -108,9 +108,3 @@ class TestMonitorMemory(unittest.TestCase):
def test_suite(): def test_suite():
return make_suite(TestMonitorMemory) return make_suite(TestMonitorMemory)
if "__main__" == __name__:
from cloudoooTestCase import startFakeEnvironment, stopFakeEnvironment
startFakeEnvironment()
suite = unittest.TestLoader().loadTestsFromTestCase(TestMonitorMemory)
unittest.TextTestRunner(verbosity=2).run(suite)
stopFakeEnvironment()
...@@ -61,10 +61,3 @@ class TestMonitorRequest(CloudoooTestCase): ...@@ -61,10 +61,3 @@ class TestMonitorRequest(CloudoooTestCase):
def test_suite(): def test_suite():
return make_suite(TestMonitorRequest) return make_suite(TestMonitorRequest)
if "__main__" == __name__:
from cloudoooTestCase import startFakeEnvironment, stopFakeEnvironment
startFakeEnvironment()
suite = unittest.TestLoader().loadTestsFromTestCase(TestMonitorRequest)
unittest.TextTestRunner(verbosity=2).run(suite)
stopFakeEnvironment()
...@@ -91,10 +91,3 @@ class TestMonitorTimeout(unittest.TestCase): ...@@ -91,10 +91,3 @@ class TestMonitorTimeout(unittest.TestCase):
def test_suite(): def test_suite():
return make_suite(TestMonitorTimeout) return make_suite(TestMonitorTimeout)
if "__main__" == __name__:
from cloudoooTestCase import startFakeEnvironment, stopFakeEnvironment
startFakeEnvironment()
suite = unittest.TestLoader().loadTestsFromTestCase(TestMonitorTimeout)
unittest.TextTestRunner(verbosity=2).run(suite)
stopFakeEnvironment()
...@@ -181,7 +181,3 @@ class TestOOGranulator(CloudoooTestCase): ...@@ -181,7 +181,3 @@ class TestOOGranulator(CloudoooTestCase):
def test_suite(): def test_suite():
return make_suite(TestOOGranulator) return make_suite(TestOOGranulator)
if __name__ == "__main__":
suite = unittest.TestLoader().loadTestsFromTestCase(TestOOGranulator)
unittest.TextTestRunner(verbosity=2).run(suite)
...@@ -203,9 +203,3 @@ class TestOOHandler(CloudoooTestCase): ...@@ -203,9 +203,3 @@ class TestOOHandler(CloudoooTestCase):
def test_suite(): def test_suite():
return make_suite(TestOOHandler) return make_suite(TestOOHandler)
if __name__ == "__main__":
from cloudoooTestCase import startFakeEnvironment, stopFakeEnvironment
startFakeEnvironment()
suite = unittest.TestLoader().loadTestsFromTestCase(TestOOHandler)
unittest.TextTestRunner(verbosity=2).run(suite)
stopFakeEnvironment()
...@@ -67,6 +67,3 @@ class TestOdfDocument(CloudoooTestCase): ...@@ -67,6 +67,3 @@ class TestOdfDocument(CloudoooTestCase):
def test_suite(): def test_suite():
return make_suite(TestOdfDocument) return make_suite(TestOdfDocument)
if __name__ == "__main__":
suite = unittest.TestLoader().loadTestsFromTestCase(TestOdfDocument)
unittest.TextTestRunner(verbosity=2).run(suite)
...@@ -117,10 +117,3 @@ class TestOpenOffice(CloudoooTestCase): ...@@ -117,10 +117,3 @@ class TestOpenOffice(CloudoooTestCase):
def test_suite(): def test_suite():
return make_suite(TestOpenOffice) return make_suite(TestOpenOffice)
if __name__ == "__main__":
from cloudoooTestCase import startFakeEnvironment, stopFakeEnvironment
startFakeEnvironment(False)
suite = unittest.TestLoader().loadTestsFromTestCase(TestOpenOffice)
unittest.TextTestRunner(verbosity=2).run(suite)
stopFakeEnvironment()
...@@ -533,9 +533,3 @@ class TestServer(CloudoooTestCase): ...@@ -533,9 +533,3 @@ class TestServer(CloudoooTestCase):
def test_suite(): def test_suite():
return make_suite(TestServer) return make_suite(TestServer)
if __name__ == "__main__":
import sys
from cloudoooTestCase import loadConfig
loadConfig(sys.argv[1])
suite = unittest.TestLoader().loadTestsFromTestCase(TestServer)
unittest.TextTestRunner(verbosity=2).run(suite)
...@@ -91,10 +91,3 @@ class TestUnoConverter(CloudoooTestCase): ...@@ -91,10 +91,3 @@ class TestUnoConverter(CloudoooTestCase):
def test_suite(): def test_suite():
return make_suite(TestUnoConverter) return make_suite(TestUnoConverter)
if __name__ == "__main__":
from cloudoooTestCase import startFakeEnvironment, stopFakeEnvironment
startFakeEnvironment()
suite = unittest.TestLoader().loadTestsFromTestCase(TestUnoConverter)
unittest.TextTestRunner(verbosity=2).run(suite)
stopFakeEnvironment()
...@@ -116,9 +116,3 @@ class TestUnoMimeMapper(CloudoooTestCase): ...@@ -116,9 +116,3 @@ class TestUnoMimeMapper(CloudoooTestCase):
def test_suite(): def test_suite():
return make_suite(TestUnoMimeMapper) return make_suite(TestUnoMimeMapper)
if __name__ == "__main__":
from cloudoooTestCase import startFakeEnvironment, stopFakeEnvironment
startFakeEnvironment()
suite = unittest.TestLoader().loadTestsFromTestCase(TestUnoMimeMapper)
unittest.TextTestRunner(verbosity=2).run(suite)
stopFakeEnvironment()
...@@ -68,9 +68,3 @@ class TestXvfb(CloudoooTestCase): ...@@ -68,9 +68,3 @@ class TestXvfb(CloudoooTestCase):
def test_suite(): def test_suite():
return make_suite(TestXvfb) return make_suite(TestXvfb)
if "__main__" == __name__:
import sys
from cloudoooTestCase import loadConfig
loadConfig(sys.argv[1])
suite = unittest.TestLoader().loadTestsFromTestCase(TestXvfb)
unittest.TextTestRunner(verbosity=2).run(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