You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, when I have source and test files in separate subfolders, testmon does not rerun tests correctly after I changed files. If I run it again, testmon creates a completely new DB file.
Windows users with Git bash installed can use this shell script to reproduce:
# Configure to see all outputset -o verbose
set -e
# Set up project
mkdir source
touch source/__init__.py
printf"def fun():\n print('a')"> source/script.py
mkdir tests
touch tests/__init__.py
printf"from source.script import fun\n\ndef test_fun():\n fun()"> tests/test_script.py
pip install -U pytest pytest-testmon==1.2.0
# First run, tests are executed
pytest --testmon
# Change codeprintf"def fun():\n print('b')"> source/script.py
# No tests are executed the first time
pytest --testmon ||echo"non-zero exit-code"# Tests are executed
pytest --testmon
It works fine on a Docker image that I tried, so I suspect the issue is related e.g. to Windows paths using backslashes.
The text was updated successfully, but these errors were encountered:
On Windows, when I have source and test files in separate subfolders, testmon does not rerun tests correctly after I changed files. If I run it again, testmon creates a completely new DB file.
Console output:
Windows users with Git bash installed can use this shell script to reproduce:
It works fine on a Docker image that I tried, so I suspect the issue is related e.g. to Windows paths using backslashes.
The text was updated successfully, but these errors were encountered: