Initial port to python3
[htsworkflow.git] / htsworkflow / submission / test / test_ucsc.py
index fad690e27f5ee638d315c593336dbd110a84fa96..2cc237c94b54cf0e918521946d4f9e15e7982c40 100644 (file)
@@ -1,5 +1,5 @@
-from unittest2 import TestCase, TestSuite, defaultTestLoader
-from StringIO import StringIO
+from unittest import TestCase, TestSuite, defaultTestLoader
+from io import StringIO
 
 from htsworkflow.submission import ucsc
 
@@ -15,7 +15,7 @@ class TestUCSCInfo(TestCase):
         file_index = ucsc.parse_ucsc_file_index(stream, 'http://example.com/files')
         self.assertEquals(len(file_index), 2)
 
-        for attributes in file_index.values():
+        for attributes in list(file_index.values()):
             self.failUnless('subId' in attributes)
             self.failUnless('project' in attributes)
             self.assertEquals(attributes['project'], 'wgEncode')
@@ -26,5 +26,5 @@ def suite():
     return suite
 
 if __name__ == "__main__":
-    from unittest2 import main
+    from unittest import main
     main(defaultTest='suite')