--- a/src/eric7/Testing/Interfaces/PytestExecutor.py Sat Dec 16 15:21:11 2023 +0100 +++ b/src/eric7/Testing/Interfaces/PytestExecutor.py Sat Dec 16 16:30:55 2023 +0100 @@ -244,6 +244,36 @@ super().start(config, pythonpath) + def startDebug(self, config, pythonpath, debugger): + """ + Public method to start the test run with debugger support. + + @param config configuration for the test execution + @type TestConfig + @param pythonpath list of directories to be added to the Python path + @type list of str + @param debugger refference to the debugger interface + @type DebugUI + """ + self.reader = EricJsonReader(name="Pytest Reader", parent=self) + self.reader.dataReceived.connect(self.__processData) + + self.__config = config + + if config.discoveryStart: + pythonpath.insert(0, os.path.abspath(config.discoveryStart)) + elif config.testFilename: + pythonpath.insert(0, os.path.abspath(os.path.dirname(config.testFilename))) + + if config.discover: + self.__rootdir = config.discoveryStart + elif config.testFilename: + self.__rootdir = os.path.dirname(config.testFilename) + else: + self.__rootdir = "" + + super().startDebug(config, pythonpath, debugger) + def finished(self): """ Public method handling the unit test process been finished. @@ -261,6 +291,8 @@ output = self.readAllOutput() self.testFinished.emit([], output) + super().finished() + @pyqtSlot(object) def __processData(self, data): """