-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testmon very sensitive towards library changes #183
Comments
Could this also be true for every changes in the requirements.txt? |
Please let me knnow if disregarding version after 2nd dot is practical enough. |
Hello! Unfortunately I don't have much time these days to try this out. Also, I am not currently using testmon at work. So, from my side, please feel free to merge the change. |
Sorry to be back one again with an issue, but the latest version is throwing. Our process is:
My guess is just that reinstalling all the dependencies on a remote environment ends up installing packages with the same version but different hashes? |
Hi Jackson, the code which retrieves current packages is here pytest-testmon/testmon/common.py Line 36 in 72c70c7
Please create a test which uses that to get and print your environment. Then you'll see what changes. It's quite likely that your own package/packages changes with every version. You can than use the undocumented testmon_ignore_dependencies configuration option to eliminate the unwanted package. (https://github.com/tarpas/pytest-testmon/blob/72c70c79aa85095df45bc201adb13bc8e7f7ec96/testmon/pytest_testmon.py#L140C5-L140C71) As for more intuitive and documented solutions. We'll drop the sensitivity in the future quite a bit more |
Ah I see, I was thinking we would also be happy to make a PR to enable/disable the hashing comparison as a flag as well. Does one set |
@jacksongoode in case you're still wondering, the setting is accepted in It would not accept a list on my end. Not sure if that's by design, it would seem reasonable to want to pass a list there. Also, the message
is still shown. But it does appear to fulfill the requirement, i.e. exempting specific installed packages when evaluating if the test run needs to be repeated 👍 |
I'd also like this to be less sensitive. E.g. If I built the testmon db this morning doing a full test run, then a version change in an external library like e.g I've tried adding that library to For this to work, does testmon_ignore_dependencies have to be set when the testmon DB is built too? |
Background
I have found
pytest-testmon
to be very sensitive towards the slightest changes for the packages in the environment it is installed.This makes very difficult to use
pytest-testmon
in practice when sharing a.testmondata
file between our developers.Use Case:
A developer is trying out a new library
foo
and have written a wrapperfoo_bar.py
for this.The developer only wants to run
test_foo_bar.py
forfoo_bar.py
, however the entire test suite is run sincefoo
was installed.Example Solution
Flag for disregarding library changes
The text was updated successfully, but these errors were encountered: