Skip to content

Fix test runner to use current Python and report failures#652

Open
xdong99 wants to merge 1 commit into
elapouya:masterfrom
xdong99:fix-test-runner-python
Open

Fix test runner to use current Python and report failures#652
xdong99 wants to merge 1 commit into
elapouya:masterfrom
xdong99:fix-test-runner-python

Conversation

@xdong99

@xdong99 xdong99 commented Jun 27, 2026

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant