Ported the unittest dialog.

Thu, 07 Jan 2010 14:41:37 +0000

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 07 Jan 2010 14:41:37 +0000
changeset 34
93367928a93b
parent 33
597036b70646
child 35
42f5cfc851da

Ported the unittest dialog.

PyUnit/UnittestDialog.py file | annotate | diff | comparison | revisions
--- a/PyUnit/UnittestDialog.py	Thu Jan 07 13:51:10 2010 +0000
+++ b/PyUnit/UnittestDialog.py	Thu Jan 07 14:41:37 2010 +0000
@@ -156,7 +156,7 @@
                 ' '.join(["*%s" % ext for ext in self.dbs.getExtensions('Python')])
             py3Extensions = \
                 ' '.join(["*%s" % ext for ext in self.dbs.getExtensions('Python3')])
-            filter = self.trUtf8("Python Files ({0});;Python3 Files ({1});;All Files (*)")\
+            filter = self.trUtf8("Python3 Files ({1});;Python2 Files ({0});;All Files (*)")\
                 .format(pyExtensions, py3Extensions)
         else:
             filter = self.trUtf8("Python Files (*.py);;All Files (*)")
@@ -179,7 +179,7 @@
         @param txt name of the test file (string)
         """
         if self.dbs:
-            exts = self.dbs.getExtensions("Python3")
+            exts = self.dbs.getExtensions("Python")
             if txt.endswith(exts):
                 self.coverageCheckBox.setChecked(False)
                 self.coverageCheckBox.setEnabled(False)
@@ -242,7 +242,7 @@
             
             # clean up list of imported modules to force a reimport upon running the test
             if self.savedModulelist:
-                for modname in sys.modules:
+                for modname in list(sys.modules.keys()):
                     if modname not in self.savedModulelist:
                         # delete it
                         del(sys.modules[modname])
@@ -592,4 +592,4 @@
             QApplication.exit()
             return True
         
-        return False
\ No newline at end of file
+        return False

eric ide

mercurial