Skip to content

compare memory usage between pytest runs #7

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

Closed
djarecka opened this issue May 2, 2022 · 2 comments · Fixed by #91
Closed

compare memory usage between pytest runs #7

djarecka opened this issue May 2, 2022 · 2 comments · Fixed by #91
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@djarecka
Copy link

djarecka commented May 2, 2022

Feature Request

Perhaps it will be useful if you can compare if tests are not using more memory after new changes.

@pablogsal pablogsal added the enhancement New feature or request label May 2, 2022
@pablogsal
Copy link
Member

Thanks! We will consider doing this feature but a workaround today is to check how much memory is using the test and then use the limit marker with the current memory usage. That way if the test is using more memory it will fail.

@petr-tik
Copy link
Contributor

feels like this could be implemented using the pytest core cache fixture
https://docs.pytest.org/en/6.2.x/cache.html#cache

the reporter can mirror the information it already prints to the terminal and cache it as well. Then print a warning if the test still passes, but uses more memory (even without the limit_memory marker?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants