src/eric7/Testing/Interfaces/PytestRunner.py

branch
eric7-maintenance
changeset 10079
0222a480e93d
parent 9654
7328efba128b
parent 10069
435cc5875135
child 10349
df7edc29cbfb
equal deleted inserted replaced
10005:097199aec4bd 10079:0222a480e93d
131 self.__sections = [] 131 self.__sections = []
132 self.__hadError = False 132 self.__hadError = False
133 self.__wasSkipped = False 133 self.__wasSkipped = False
134 self.__wasXfail = False 134 self.__wasXfail = False
135 135
136 def pytest_report_header(self, config, startdir): 136 def pytest_report_header(self, config, startdir): # noqa: U100
137 """ 137 """
138 Public method called by pytest before any reporting. 138 Public method called by pytest before any reporting.
139 139
140 @param config reference to the configuration object 140 @param config reference to the configuration object
141 @type Config 141 @type Config
173 "nodeid": item.nodeid, 173 "nodeid": item.nodeid,
174 "name": item.name, 174 "name": item.name,
175 } 175 }
176 ) 176 )
177 177
178 def pytest_runtest_logstart(self, nodeid, location): 178 def pytest_runtest_logstart(self, nodeid, location): # noqa: U100
179 """ 179 """
180 Public method called by pytest before running a test. 180 Public method called by pytest before running a test.
181 181
182 @param nodeid node id of the test item 182 @param nodeid node id of the test item
183 @type str 183 @type str
265 data["message"] = messageLines[0] 265 data["message"] = messageLines[0]
266 data["report"] = "\n".join(self.__report) 266 data["report"] = "\n".join(self.__report)
267 267
268 self.__writer.write(data) 268 self.__writer.write(data)
269 269
270 def pytest_sessionstart(self, session): 270 def pytest_sessionstart(self, session): # noqa: U100
271 """ 271 """
272 Public method called by pytest before performing collection and 272 Public method called by pytest before performing collection and
273 entering the run test loop. 273 entering the run test loop.
274 274
275 @param session reference to the session object 275 @param session reference to the session object
276 @type Session 276 @type Session
277 """ 277 """
278 self.__totalStartTime = time.monotonic_ns() 278 self.__totalStartTime = time.monotonic_ns()
279 self.__testsRun = 0 279 self.__testsRun = 0
280 280
281 def pytest_sessionfinish(self, session, exitstatus): 281 def pytest_sessionfinish(self, session, exitstatus): # noqa: U100
282 """ 282 """
283 Public method called by pytest after the whole test run finished. 283 Public method called by pytest after the whole test run finished.
284 284
285 @param session reference to the session object 285 @param session reference to the session object
286 @type Session 286 @type Session

eric ide

mercurial