eric7/Documentation/Source/eric7.Testing.Interfaces.PytestExecutor.html

branch
eric7-maintenance
changeset 9131
bc0c1b6d6adb
equal deleted inserted replaced
9112:9967ae9f0906 9131:bc0c1b6d6adb
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.Testing.Interfaces.PytestExecutor</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.Testing.Interfaces.PytestExecutor</h1>
10
11 <p>
12 Module implementing the executor for the 'pytest' framework.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>None</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22
23 <tr>
24 <td><a href="#PytestExecutor">PytestExecutor</a></td>
25 <td>Class implementing the executor for the 'pytest' framework.</td>
26 </tr>
27 </table>
28 <h3>Functions</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <hr />
34 <hr />
35 <a NAME="PytestExecutor" ID="PytestExecutor"></a>
36 <h2>PytestExecutor</h2>
37
38 <p>
39 Class implementing the executor for the 'pytest' framework.
40 </p>
41 <h3>Derived from</h3>
42 TestExecutorBase
43 <h3>Class Attributes</h3>
44
45 <table>
46 <tr><td>module</td></tr><tr><td>name</td></tr><tr><td>runner</td></tr>
47 </table>
48 <h3>Class Methods</h3>
49
50 <table>
51 <tr><td>None</td></tr>
52 </table>
53 <h3>Methods</h3>
54
55 <table>
56
57 <tr>
58 <td><a href="#PytestExecutor.__init__">PytestExecutor</a></td>
59 <td>Constructor</td>
60 </tr>
61 <tr>
62 <td><a href="#PytestExecutor.__nodeid2testname">__nodeid2testname</a></td>
63 <td>Private method to convert a nodeid to a test name.</td>
64 </tr>
65 <tr>
66 <td><a href="#PytestExecutor.__normalizeModuleName">__normalizeModuleName</a></td>
67 <td>Private method to convert a module name reported by pytest to Python conventions.</td>
68 </tr>
69 <tr>
70 <td><a href="#PytestExecutor.__processData">__processData</a></td>
71 <td>Private slot to process the received data.</td>
72 </tr>
73 <tr>
74 <td><a href="#PytestExecutor.createArguments">createArguments</a></td>
75 <td>Public method to create the arguments needed to start the test process.</td>
76 </tr>
77 <tr>
78 <td><a href="#PytestExecutor.finished">finished</a></td>
79 <td>Public method handling the unit test process been finished.</td>
80 </tr>
81 <tr>
82 <td><a href="#PytestExecutor.getVersions">getVersions</a></td>
83 <td>Public method to get the test framework version and version information of its installed plugins.</td>
84 </tr>
85 <tr>
86 <td><a href="#PytestExecutor.hasCoverage">hasCoverage</a></td>
87 <td>Public method to get the test framework version and version information of its installed plugins.</td>
88 </tr>
89 <tr>
90 <td><a href="#PytestExecutor.start">start</a></td>
91 <td>Public method to start the testing process.</td>
92 </tr>
93 </table>
94 <h3>Static Methods</h3>
95
96 <table>
97 <tr><td>None</td></tr>
98 </table>
99
100 <a NAME="PytestExecutor.__init__" ID="PytestExecutor.__init__"></a>
101 <h4>PytestExecutor (Constructor)</h4>
102 <b>PytestExecutor</b>(<i>testWidget</i>)
103
104 <p>
105 Constructor
106 </p>
107 <dl>
108
109 <dt><i>testWidget</i> (TestingWidget)</dt>
110 <dd>
111 reference to the unit test widget
112 </dd>
113 </dl>
114 <a NAME="PytestExecutor.__nodeid2testname" ID="PytestExecutor.__nodeid2testname"></a>
115 <h4>PytestExecutor.__nodeid2testname</h4>
116 <b>__nodeid2testname</b>(<i>nodeid</i>)
117
118 <p>
119 Private method to convert a nodeid to a test name.
120 </p>
121 <dl>
122
123 <dt><i>nodeid</i> (str)</dt>
124 <dd>
125 nodeid to be converted
126 </dd>
127 </dl>
128 <dl>
129 <dt>Return:</dt>
130 <dd>
131 test name
132 </dd>
133 </dl>
134 <dl>
135 <dt>Return Type:</dt>
136 <dd>
137 str
138 </dd>
139 </dl>
140 <a NAME="PytestExecutor.__normalizeModuleName" ID="PytestExecutor.__normalizeModuleName"></a>
141 <h4>PytestExecutor.__normalizeModuleName</h4>
142 <b>__normalizeModuleName</b>(<i>name</i>)
143
144 <p>
145 Private method to convert a module name reported by pytest to Python
146 conventions.
147 </p>
148 <p>
149 This method strips the extensions '.pyw' and '.py' first and replaces
150 '/' and '\' thereafter.
151 </p>
152 <dl>
153
154 <dt><i>name</i> (str)</dt>
155 <dd>
156 module name reported by pytest
157 </dd>
158 </dl>
159 <dl>
160 <dt>Return:</dt>
161 <dd>
162 module name iaw. Python conventions
163 </dd>
164 </dl>
165 <dl>
166 <dt>Return Type:</dt>
167 <dd>
168 str
169 </dd>
170 </dl>
171 <a NAME="PytestExecutor.__processData" ID="PytestExecutor.__processData"></a>
172 <h4>PytestExecutor.__processData</h4>
173 <b>__processData</b>(<i>data</i>)
174
175 <p>
176 Private slot to process the received data.
177 </p>
178 <dl>
179
180 <dt><i>data</i> (dict)</dt>
181 <dd>
182 data object received
183 </dd>
184 </dl>
185 <a NAME="PytestExecutor.createArguments" ID="PytestExecutor.createArguments"></a>
186 <h4>PytestExecutor.createArguments</h4>
187 <b>createArguments</b>(<i>config</i>)
188
189 <p>
190 Public method to create the arguments needed to start the test process.
191 </p>
192 <dl>
193
194 <dt><i>config</i> (TestConfig)</dt>
195 <dd>
196 configuration for the test execution
197 </dd>
198 </dl>
199 <dl>
200 <dt>Return:</dt>
201 <dd>
202 list of process arguments
203 </dd>
204 </dl>
205 <dl>
206 <dt>Return Type:</dt>
207 <dd>
208 list of str
209 </dd>
210 </dl>
211 <a NAME="PytestExecutor.finished" ID="PytestExecutor.finished"></a>
212 <h4>PytestExecutor.finished</h4>
213 <b>finished</b>(<i></i>)
214
215 <p>
216 Public method handling the unit test process been finished.
217 </p>
218 <p>
219 This method should read the results (if necessary) and emit the signal
220 testFinished.
221 </p>
222 <a NAME="PytestExecutor.getVersions" ID="PytestExecutor.getVersions"></a>
223 <h4>PytestExecutor.getVersions</h4>
224 <b>getVersions</b>(<i>interpreter</i>)
225
226 <p>
227 Public method to get the test framework version and version information
228 of its installed plugins.
229 </p>
230 <dl>
231
232 <dt><i>interpreter</i> (str)</dt>
233 <dd>
234 interpreter to be used for the test
235 </dd>
236 </dl>
237 <dl>
238 <dt>Return:</dt>
239 <dd>
240 dictionary containing the framework name and version and the
241 list of available plugins with name and version each
242 </dd>
243 </dl>
244 <dl>
245 <dt>Return Type:</dt>
246 <dd>
247 dict
248 </dd>
249 </dl>
250 <a NAME="PytestExecutor.hasCoverage" ID="PytestExecutor.hasCoverage"></a>
251 <h4>PytestExecutor.hasCoverage</h4>
252 <b>hasCoverage</b>(<i>interpreter</i>)
253
254 <p>
255 Public method to get the test framework version and version information
256 of its installed plugins.
257 </p>
258 <dl>
259
260 <dt><i>interpreter</i> (str)</dt>
261 <dd>
262 interpreter to be used for the test
263 </dd>
264 </dl>
265 <dl>
266 <dt>Return:</dt>
267 <dd>
268 flag indicating the availability of coverage functionality
269 </dd>
270 </dl>
271 <dl>
272 <dt>Return Type:</dt>
273 <dd>
274 bool
275 </dd>
276 </dl>
277 <a NAME="PytestExecutor.start" ID="PytestExecutor.start"></a>
278 <h4>PytestExecutor.start</h4>
279 <b>start</b>(<i>config, pythonpath</i>)
280
281 <p>
282 Public method to start the testing process.
283 </p>
284 <dl>
285
286 <dt><i>config</i> (TestConfig)</dt>
287 <dd>
288 configuration for the test execution
289 </dd>
290 <dt><i>pythonpath</i> (list of str)</dt>
291 <dd>
292 list of directories to be added to the Python path
293 </dd>
294 </dl>
295 <div align="right"><a href="#top">Up</a></div>
296 <hr />
297 </body></html>

eric ide

mercurial