tarpas / pytest-testmon

Selects tests affected by changed files. Executes the right tests first. Continuous test runner when used with pytest-watch.
https://testmon.org
MIT License
800 stars 54 forks source link

Remove testmondata automatically if old #188

Closed jacksongoode closed 1 year ago

jacksongoode commented 1 year ago

Across versions we often get the error:

testmon.db.TestmonDbException: The stored data file ***/.testmondata version (0) is not compatible with current version (9). You must delete the stored data to continue.

To me, I would be happy with the default behavior of printing a warning regarding the old testmondata file, rename it to testmondata.old and generate anew. Currently we have to account for pytest failing as a result of this error when updating testmon. If this is something, you'd be open to I can make a PR.

tarpas commented 1 year ago

Incidentally I already worked on this as a part of a little refactoring. No PR needed, it should be released soon.

tarpas commented 1 year ago

This has been implemented since v1.3.4. @jacksongoode pytest-xdist support has been implemented in v1.4.0a0 (pre-release)