projects
/
htsworkflow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Convert to unittest2
[htsworkflow.git]
/
htsworkflow
/
util
/
test
/
test_queuecommands.py
diff --git
a/htsworkflow/util/test/test_queuecommands.py
b/htsworkflow/util/test/test_queuecommands.py
index dc745a6ff6d2c6d60d4a8274281c4989fd65b2a2..5885f73515e4422f3acaa39723f57dc1564ab26a 100644
(file)
--- a/
htsworkflow/util/test/test_queuecommands.py
+++ b/
htsworkflow/util/test/test_queuecommands.py
@@
-1,17
+1,15
@@
import os
import logging
import time
import os
import logging
import time
-import unittest
+from unittest2 import TestCase
from htsworkflow.util.queuecommands import QueueCommands
from htsworkflow.util.queuecommands import QueueCommands
-class testQueueCommands(
unittest.
TestCase):
+class testQueueCommands(TestCase):
def setUp(self):
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(name)-8s %(message)s')
def setUp(self):
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(name)-8s %(message)s')
-
-
def test_unlimited_run_slow(self):
"""
Run everything at once
def test_unlimited_run_slow(self):
"""
Run everything at once
@@
-44,12
+42,14
@@
class testQueueCommands(unittest.TestCase):
self.failUnless( end > 3.9 and end < 4.1,
"took %s seconds, expected ~4" % (end,))
self.failUnless( end > 3.9 and end < 4.1,
"took %s seconds, expected ~4" % (end,))
-def suite():
- return unittest.makeSuite(testQueueCommands, 'test')
-
-if __name__ == "__main__":
- unittest.main(defaultTest='suite')
-
+def suite():
+ from unittest2 import TestSuite, defaultTestLoader
+ suite = TestSuite()
+ suite.addTests(defaultTestLoader.loadTestsFromTestCase(testQueueCommands))
+ return suite
+if __name__ == "__main__":
+ from unittest2 import main
+ main(defaultTest="suite")