projects
/
htsworkflow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change unittest2 back into unittest.
[htsworkflow.git]
/
htsworkflow
/
util
/
test
/
test_alphanum.py
diff --git
a/htsworkflow/util/test/test_alphanum.py
b/htsworkflow/util/test/test_alphanum.py
index 3fd60250cbe392f9208c077076253fd6aed10f94..a47e682d977a2f9099ac876e55b3859961acd40b 100644
(file)
--- a/
htsworkflow/util/test/test_alphanum.py
+++ b/
htsworkflow/util/test/test_alphanum.py
@@
-1,10
+1,10
@@
import copy
import os
import copy
import os
-import unittest
+from unittest import TestCase
from htsworkflow.util.alphanum import alphanum
from htsworkflow.util.alphanum import alphanum
-class testAlphanum(
unittest.
TestCase):
+class testAlphanum(TestCase):
def test_string(self):
unsorted = ['z5', 'b3', 'b10', 'a001', 'a2']
sorted = [ 'a001', 'a2', 'b3', 'b10', 'z5']
def test_string(self):
unsorted = ['z5', 'b3', 'b10', 'a001', 'a2']
sorted = [ 'a001', 'a2', 'b3', 'b10', 'z5']
@@
-42,7
+42,12
@@
class testAlphanum(unittest.TestCase):
def suite():
def suite():
- return unittest.makeSuite(testAlphanum, 'test')
+ from unittest import TestSuite, defaultTestLoader
+ suite = TestSuite()
+ suite.addTests(defaultTestLoader.loadTestsFromTestCase(testAlphanum))
+ return suite
+
if __name__ == "__main__":
if __name__ == "__main__":
- unittest.main(defaultTest='suite')
+ from unittest import main
+ main(defaultTest="suite")