src/eric7/Testing/Interfaces/UnittestExecutor.py

branch
eric7
changeset 10425
0badf8f80d7c
parent 10415
af9a6dac2611
child 10431
64157aeb0312
--- a/src/eric7/Testing/Interfaces/UnittestExecutor.py	Wed Dec 20 10:02:19 2023 +0100
+++ b/src/eric7/Testing/Interfaces/UnittestExecutor.py	Wed Dec 20 10:47:17 2023 +0100
@@ -82,15 +82,17 @@
 
     def hasCoverage(self, interpreter):  # noqa: U100
         """
-        Public method to get the test framework version and version information
-        of its installed plugins.
+        Public method to check, if the collection of coverage data is available.
 
         @param interpreter interpreter to be used for the test
         @type str
         @return flag indicating the availability of coverage functionality
         @rtype bool
         """
-        return True
+        proc = QProcess()
+        proc.start(interpreter, [UnittestExecutor.runner, "has_coverage"])
+        if proc.waitForFinished(3000):
+            return proc.exitCode() == 0
 
     def supportsPatterns(self, interpreter):  # noqa: U100
         """

eric ide

mercurial