python-docx-template icon indicating copy to clipboard operation
python-docx-template copied to clipboard

Fix test runner to use current Python and report failures

Open xdong99 opened this issue 5 months ago • 0 comments

Summary

  • Run test scripts with sys.executable so the active virtualenv/CI Python is preserved.
  • Resolve test files relative to the tests/ directory, allowing python tests/runtests.py from the repo root.
  • Exit non-zero when any test script fails.
  • Replace os.system("python -m docxtpl ...") with subprocess.run(..., check=True).

Verification

  • python tests/runtests.py
  • python -m flake8 docxtpl tests setup.py --count --max-line-length=127 --show-source --statistics

xdong99 avatar Jun 27 '26 04:06 xdong99