#!/usr/bin/env python
""" Run the tests as fast as possible """

import os
import sys

os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

coverage = "--no-cov-on-fail --cov-report term-missing --cov ."
targets = "tests/*.py dominion/*.py dominion/*/*.py dominion/*/*/*.py"
cmd = f"PYDOMINION_DEBUG='' pytest -n auto {coverage} {targets}"
print(f"{cmd=}")
rc = os.system(cmd)
os.system("coverage html")

sys.exit(rc >> 8)

# EOF
