src/eric7/Testing/Interfaces/PytestRunner.py

branch
eric7
changeset 10331
c1a2ff7e3575
parent 10069
435cc5875135
child 10349
df7edc29cbfb
child 10404
f7d9c31f0c38
equal deleted inserted replaced
10330:5ea038882dd6 10331:c1a2ff7e3575
6 """ 6 """
7 Module implementing the test runner script for the 'pytest' framework. 7 Module implementing the test runner script for the 'pytest' framework.
8 """ 8 """
9 9
10 import contextlib 10 import contextlib
11 import importlib
11 import json 12 import json
12 import os 13 import os
13 import sys 14 import sys
14 import time 15 import time
15 16
343 344
344 345
345 if __name__ == "__main__": 346 if __name__ == "__main__":
346 command = sys.argv[1] 347 command = sys.argv[1]
347 if command == "installed": 348 if command == "installed":
348 try: 349 if bool(importlib.util.find_spec("pytest")):
349 import pytest # __IGNORE_WARNING__
350
351 sys.exit(0) 350 sys.exit(0)
352 except ImportError: 351 else:
353 sys.exit(1) 352 sys.exit(1)
354 353
355 elif command == "versions": 354 elif command == "versions":
356 getVersions() 355 getVersions()
357 356

eric ide

mercurial