src/eric7/Testing/Interfaces/UnittestExecutor.py

Wed, 30 Nov 2022 09:19:51 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 30 Nov 2022 09:19:51 +0100
branch
eric7-maintenance
changeset 9549
67295777d9fe
parent 9442
906485dcd210
parent 9547
38fa6ca90253
child 9654
7328efba128b
permissions
-rw-r--r--

Merged with branch 'eric7' to prepare a new release.

9059
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3 # Copyright (c) 2022 Detlev Offenbach <detlev@die-offenbachs.de>
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing the executor for the standard 'unittest' framework.
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 import contextlib
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11 import json
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 import os
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
13 import re
9059
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
9473
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
15 from PyQt6.QtCore import QProcess, pyqtSlot
9059
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16
9413
80c06d472826 Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9313
diff changeset
17 from eric7.EricNetwork.EricJsonStreamReader import EricJsonReader
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
18
9066
a219ade50f7c Performed some refactoring to avoid possible name clashes on case-insensitive systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9065
diff changeset
19 from .TestExecutorBase import TestExecutorBase, TestResult, TestResultCategory
9059
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21
9066
a219ade50f7c Performed some refactoring to avoid possible name clashes on case-insensitive systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9065
diff changeset
22 class UnittestExecutor(TestExecutorBase):
9059
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 """
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 Class implementing the executor for the standard 'unittest' framework.
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
26
9059
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 module = "unittest"
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 name = "unittest"
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
29
9059
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 runner = os.path.join(os.path.dirname(__file__), "UnittestRunner.py")
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
31
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
32 def __init__(self, testWidget):
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
33 """
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
34 Constructor
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
35
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
36 @param testWidget reference to the unit test widget
9066
a219ade50f7c Performed some refactoring to avoid possible name clashes on case-insensitive systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9065
diff changeset
37 @type TestingWidget
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
38 """
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
39 super().__init__(testWidget)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
40
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
41 self.__statusCategoryMapping = {
9066
a219ade50f7c Performed some refactoring to avoid possible name clashes on case-insensitive systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9065
diff changeset
42 "failure": TestResultCategory.FAIL,
a219ade50f7c Performed some refactoring to avoid possible name clashes on case-insensitive systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9065
diff changeset
43 "error": TestResultCategory.FAIL,
a219ade50f7c Performed some refactoring to avoid possible name clashes on case-insensitive systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9065
diff changeset
44 "skipped": TestResultCategory.SKIP,
a219ade50f7c Performed some refactoring to avoid possible name clashes on case-insensitive systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9065
diff changeset
45 "expected failure": TestResultCategory.OK,
a219ade50f7c Performed some refactoring to avoid possible name clashes on case-insensitive systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9065
diff changeset
46 "unexpected success": TestResultCategory.FAIL,
a219ade50f7c Performed some refactoring to avoid possible name clashes on case-insensitive systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9065
diff changeset
47 "success": TestResultCategory.OK,
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
48 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
49
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
50 self.__statusDisplayMapping = {
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
51 "failure": self.tr("Failure"),
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
52 "error": self.tr("Error"),
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
53 "skipped": self.tr("Skipped"),
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
54 "expected failure": self.tr("Expected Failure"),
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
55 "unexpected success": self.tr("Unexpected Success"),
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
56 "success": self.tr("Success"),
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
57 }
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
58
9064
339bb8c8007d Implemented the "Rerun Failed" functionality for the new unit test interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9063
diff changeset
59 self.__testWidget = testWidget
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
60
9059
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 def getVersions(self, interpreter):
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 """
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 Public method to get the test framework version and version information
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 of its installed plugins.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
65
9059
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 @param interpreter interpreter to be used for the test
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 @type str
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 @return dictionary containing the framework name and version and the
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 list of available plugins with name and version each
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 @rtype dict
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 """
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 proc = QProcess()
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 proc.start(interpreter, [UnittestExecutor.runner, "versions"])
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74 if proc.waitForFinished(3000):
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 exitCode = proc.exitCode()
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 if exitCode == 0:
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 versionsStr = self.readAllOutput(proc)
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 with contextlib.suppress(json.JSONDecodeError):
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 return json.loads(versionsStr)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
80
9059
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81 return {}
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
82
9089
b48a6d0f6309 Implemented support for the 'pytest' framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9070
diff changeset
83 def hasCoverage(self, interpreter):
b48a6d0f6309 Implemented support for the 'pytest' framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9070
diff changeset
84 """
b48a6d0f6309 Implemented support for the 'pytest' framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9070
diff changeset
85 Public method to get the test framework version and version information
b48a6d0f6309 Implemented support for the 'pytest' framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9070
diff changeset
86 of its installed plugins.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
87
9089
b48a6d0f6309 Implemented support for the 'pytest' framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9070
diff changeset
88 @param interpreter interpreter to be used for the test
b48a6d0f6309 Implemented support for the 'pytest' framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9070
diff changeset
89 @type str
b48a6d0f6309 Implemented support for the 'pytest' framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9070
diff changeset
90 @return flag indicating the availability of coverage functionality
b48a6d0f6309 Implemented support for the 'pytest' framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9070
diff changeset
91 @rtype bool
b48a6d0f6309 Implemented support for the 'pytest' framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9070
diff changeset
92 """
b48a6d0f6309 Implemented support for the 'pytest' framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9070
diff changeset
93 return True
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
94
9313
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
95 def supportsPatterns(self, interpreter):
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
96 """
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
97 Public method to indicate the support for test filtering using test name
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
98 patterns or a test name pattern expression.
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
99
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
100 @param interpreter interpreter to be used for the test
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
101 @type str
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
102 @return flag indicating support of markers
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
103 @rtype bool
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
104 """
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
105 return True
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
106
9059
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 def createArguments(self, config):
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 """
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 Public method to create the arguments needed to start the test process.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
110
9059
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 @param config configuration for the test execution
9066
a219ade50f7c Performed some refactoring to avoid possible name clashes on case-insensitive systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9065
diff changeset
112 @type TestConfig
9059
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 @return list of process arguments
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 @rtype list of str
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
115 """
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
116 args = [
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
117 UnittestExecutor.runner,
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
118 "runtest",
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
119 self.reader.address(),
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
120 str(self.reader.port()),
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
121 ]
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
122
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
123 if config.discover:
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
124 args.extend(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
125 [
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
126 "discover",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
127 "--start-directory",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
128 config.discoveryStart,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
129 ]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
130 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
131
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
132 if config.failFast:
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
133 args.append("--failfast")
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
134
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
135 if config.collectCoverage:
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
136 args.append("--cover")
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
137 if config.eraseCoverage:
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
138 args.append("--cover-erase")
9070
eab09a1ab8ce Implemented the "Show Coverage" functionality and corrected the coverage related code in UnittestRunner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9066
diff changeset
139 if config.coverageFile:
eab09a1ab8ce Implemented the "Show Coverage" functionality and corrected the coverage related code in UnittestRunner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9066
diff changeset
140 args.append("--cover-file")
eab09a1ab8ce Implemented the "Show Coverage" functionality and corrected the coverage related code in UnittestRunner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9066
diff changeset
141 args.append(config.coverageFile)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
142
9313
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
143 if config.testNamePattern:
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
144 args.append("--pattern")
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
145 args.append(config.testNamePattern)
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
146
9064
339bb8c8007d Implemented the "Rerun Failed" functionality for the new unit test interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9063
diff changeset
147 if config.failedOnly:
339bb8c8007d Implemented the "Rerun Failed" functionality for the new unit test interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9063
diff changeset
148 args.append("--failed-only")
339bb8c8007d Implemented the "Rerun Failed" functionality for the new unit test interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9063
diff changeset
149 if config.testFilename:
339bb8c8007d Implemented the "Rerun Failed" functionality for the new unit test interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9063
diff changeset
150 args.append(config.testFilename)
339bb8c8007d Implemented the "Rerun Failed" functionality for the new unit test interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9063
diff changeset
151 args.extend(self.__testWidget.getFailedTests())
9089
b48a6d0f6309 Implemented support for the 'pytest' framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9070
diff changeset
152 elif config.testFilename:
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
153 args.append(config.testFilename)
9313
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
154 args.append(config.testName if config.testName else "@NONE@")
6bac6775abb2 Testing
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
155 # @NONE@ is just a marker for no test name given
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
156
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
157 return args
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
158
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
159 def start(self, config, pythonpath):
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
160 """
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
161 Public method to start the testing process.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
162
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
163 @param config configuration for the test execution
9066
a219ade50f7c Performed some refactoring to avoid possible name clashes on case-insensitive systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9065
diff changeset
164 @type TestConfig
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
165 @param pythonpath list of directories to be added to the Python path
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
166 @type list of str
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
167 """
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
168 self.reader = EricJsonReader(name="Unittest Reader", parent=self)
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
169 self.reader.dataReceived.connect(self.__processData)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
170
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
171 super().start(config, pythonpath)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
172
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
173 def finished(self):
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
174 """
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
175 Public method handling the unit test process been finished.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
176
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
177 This method should read the results (if necessary) and emit the signal
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
178 testFinished.
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
179 """
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
180 self.reader.close()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
181
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
182 output = self.readAllOutput()
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
183 self.testFinished.emit([], output)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
184
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
185 @pyqtSlot(object)
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
186 def __processData(self, data):
9059
e7fd342f8bfc Implemented the basic functionality of the new unit test framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
187 """
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
188 Private slot to process the received data.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
189
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
190 @param data data object received
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
191 @type dict
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
192 """
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
193 # error collecting tests
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
194 if data["event"] == "collecterror":
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
195 self.collectError.emit([("", data["error"])])
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
196
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
197 # tests collected
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
198 elif data["event"] == "collected":
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
199 self.collected.emit(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
200 [(t["id"], t["name"], t["description"]) for t in data["tests"]]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
201 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
202
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
203 # test started
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
204 elif data["event"] == "started":
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
205 self.startTest.emit((data["id"], data["name"], data["description"]))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
206
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
207 # test result
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
208 elif data["event"] == "result":
9065
39405e6eba20 Integrated the new testing widget into the eric IDE (compared to as a standalone app) and implemented the 'Show Source' functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9064
diff changeset
209 filename, lineno = None, None
9089
b48a6d0f6309 Implemented support for the 'pytest' framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9070
diff changeset
210 tracebackLines = data.get("traceback", "").splitlines()
b48a6d0f6309 Implemented support for the 'pytest' framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9070
diff changeset
211 if tracebackLines:
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
212 # find the last entry matching the pattern
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
213 for index in range(len(tracebackLines) - 1, -1, -1):
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
214 fmatch = re.search(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
215 r'File "(.*?)", line (\d*?),.*', tracebackLines[index]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
216 )
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
217 if fmatch:
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
218 break
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
219 if fmatch:
9065
39405e6eba20 Integrated the new testing widget into the eric IDE (compared to as a standalone app) and implemented the 'Show Source' functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9064
diff changeset
220 filename = fmatch.group(1)
39405e6eba20 Integrated the new testing widget into the eric IDE (compared to as a standalone app) and implemented the 'Show Source' functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9064
diff changeset
221 lineno = int(fmatch.group(2))
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
222
9089
b48a6d0f6309 Implemented support for the 'pytest' framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9070
diff changeset
223 message = data.get("shortmsg", "")
b48a6d0f6309 Implemented support for the 'pytest' framework.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9070
diff changeset
224 if not message and tracebackLines:
9547
38fa6ca90253 Fixed an issue in UnittestExecutor causing failing asserts with multi element values not (e.g. tuple, list) not to be shown and raising an exception instead (caused by a wrong assumption about the reported traceback).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
225 # search the line containing the assertion error
38fa6ca90253 Fixed an issue in UnittestExecutor causing failing asserts with multi element values not (e.g. tuple, list) not to be shown and raising an exception instead (caused by a wrong assumption about the reported traceback).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
226 for index in range(len(tracebackLines) - 1, -1, -1):
38fa6ca90253 Fixed an issue in UnittestExecutor causing failing asserts with multi element values not (e.g. tuple, list) not to be shown and raising an exception instead (caused by a wrong assumption about the reported traceback).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
227 line = tracebackLines[index].strip()
38fa6ca90253 Fixed an issue in UnittestExecutor causing failing asserts with multi element values not (e.g. tuple, list) not to be shown and raising an exception instead (caused by a wrong assumption about the reported traceback).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
228 if line.startswith("AssertionError:"):
38fa6ca90253 Fixed an issue in UnittestExecutor causing failing asserts with multi element values not (e.g. tuple, list) not to be shown and raising an exception instead (caused by a wrong assumption about the reported traceback).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
229 message = line.replace("AssertionError:", "").strip()
38fa6ca90253 Fixed an issue in UnittestExecutor causing failing asserts with multi element values not (e.g. tuple, list) not to be shown and raising an exception instead (caused by a wrong assumption about the reported traceback).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
230 break
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
231
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
232 self.testResult.emit(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
233 TestResult(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
234 category=self.__statusCategoryMapping[data["status"]],
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
235 status=self.__statusDisplayMapping[data["status"]],
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
236 name=data["name"],
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
237 id=data["id"],
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
238 description=data["description"],
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
239 message=message,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
240 extra=tracebackLines,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
241 duration=data.get("duration_ms", None),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
242 filename=filename,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
243 lineno=lineno,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
244 subtestResult=data.get("subtest", False),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
245 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
246 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
247
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
248 # test run finished
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
249 elif data["event"] == "finished":
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
250 self.testRunFinished.emit(data["tests"], data["duration_s"])
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
251
9062
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
252 # coverage data
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
253 elif data["event"] == "coverage":
7f27bf3b50c3 Implemented most of the 'unittest' executor and runner.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9059
diff changeset
254 self.coverageDataSaved.emit(data["file"])

eric ide

mercurial