324 def getMarkers(): |
328 def getMarkers(): |
325 """ |
329 """ |
326 Function to determine the defined markers and their descriptions. |
330 Function to determine the defined markers and their descriptions. |
327 """ |
331 """ |
328 try: |
332 try: |
329 import pytest |
333 import pytest # __IGNORE_WARNING_I10__ |
330 |
334 |
331 # --capture=sys needed on Windows to avoid |
335 # --capture=sys needed on Windows to avoid |
332 # ValueError: saved filedescriptor not valid anymore |
336 # ValueError: saved filedescriptor not valid anymore |
333 plugin = GetMarkersPlugin() |
337 plugin = GetMarkersPlugin() |
334 pytest.main(["--markers", "--capture=sys"], plugins=[plugin]) |
338 pytest.main(["--markers", "--capture=sys"], plugins=[plugin]) |
354 elif command == "markers": |
358 elif command == "markers": |
355 getMarkers() |
359 getMarkers() |
356 |
360 |
357 elif command == "runtest": |
361 elif command == "runtest": |
358 import pytest |
362 import pytest |
|
363 |
359 from eric7.EricNetwork.EricJsonStreamWriter import EricJsonWriter |
364 from eric7.EricNetwork.EricJsonStreamWriter import EricJsonWriter |
360 |
365 |
361 writer = EricJsonWriter(sys.argv[2], int(sys.argv[3])) |
366 writer = EricJsonWriter(sys.argv[2], int(sys.argv[3])) |
362 pytest.main(sys.argv[4:], plugins=[EricPlugin(writer)]) |
367 pytest.main(sys.argv[4:], plugins=[EricPlugin(writer)]) |
363 writer.close() |
368 writer.close() |