allow keeping .cpp files in test runner
authorStefan Behnel <scoder@users.berlios.de>
Mon, 1 Sep 2008 07:08:27 +0000 (09:08 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Mon, 1 Sep 2008 07:08:27 +0000 (09:08 +0200)
runtests.py

index c605f1d2e34a5599229ace669eb6d002e4af2de1..3b431c1d0eba655df665eb042817d3d5298c0c9a 100644 (file)
@@ -157,8 +157,9 @@ class CythonCompileTestCase(unittest.TestCase):
         cleanup_lib_files = self.cleanup_sharedlibs
         if os.path.exists(self.workdir):
             for rmfile in os.listdir(self.workdir):
-                if not cleanup_c_files and rmfile[-2:] in (".c", ".h", ".cpp"):
-                    continue
+                if not cleanup_c_files:
+                    if rmfile[-2:] in (".c", ".h") or rmfile[-4:] == ".cpp":
+                        continue
                 if not cleanup_lib_files and rmfile.endswith(".so") or rmfile.endswith(".dll"):
                     continue
                 if self.annotate and rmfile.endswith(".html"):