From 8fb0e4012894f00e835c1abaf48e4e6d1208c817 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Mon, 1 Sep 2008 09:08:27 +0200 Subject: [PATCH] allow keeping .cpp files in test runner --- runtests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runtests.py b/runtests.py index c605f1d2..3b431c1d 100644 --- a/runtests.py +++ b/runtests.py @@ -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"): -- 2.26.2