src/eric7/Testing/Interfaces/UnittestExecutor.py

branch
eric7-maintenance
changeset 9371
1da8bc75946f
parent 9264
18a7312cfdb3
parent 9313
6bac6775abb2
child 9442
906485dcd210
diff -r 90dc02c8a384 -r 1da8bc75946f src/eric7/Testing/Interfaces/UnittestExecutor.py
--- a/src/eric7/Testing/Interfaces/UnittestExecutor.py	Fri Sep 02 14:10:44 2022 +0200
+++ b/src/eric7/Testing/Interfaces/UnittestExecutor.py	Sat Oct 01 13:06:10 2022 +0200
@@ -92,6 +92,18 @@
         """
         return True
 
+    def supportsPatterns(self, interpreter):
+        """
+        Public method to indicate the support for test filtering using test name
+        patterns or a test name pattern expression.
+
+        @param interpreter interpreter to be used for the test
+        @type str
+        @return flag indicating support of markers
+        @rtype bool
+        """
+        return True
+
     def createArguments(self, config):
         """
         Public method to create the arguments needed to start the test process.
@@ -128,6 +140,10 @@
                 args.append("--cover-file")
                 args.append(config.coverageFile)
 
+        if config.testNamePattern:
+            args.append("--pattern")
+            args.append(config.testNamePattern)
+
         if config.failedOnly:
             args.append("--failed-only")
             if config.testFilename:
@@ -135,7 +151,8 @@
             args.extend(self.__testWidget.getFailedTests())
         elif config.testFilename:
             args.append(config.testFilename)
-            args.append(config.testName if config.testName else "suite")
+            args.append(config.testName if config.testName else "@NONE@")
+            # @NONE@ is just a marker for no test name given
 
         return args
 

eric ide

mercurial