How to set memory usage limit in pytest? #11278
Unanswered
Coder2023Coder
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Hi @Coder2023Coder, I think you will need to follow the same approach used by |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Since the space complexity of some functions I am testing are high and the operating system kills their testing execution, I want to set a memory usage limit in a way that as soon as a test case running the main code under test, exceeds taking that allowed amount of memory, pytest stops it and flags it as failed. I am NOT using command line so I am looking for a solution to implement in my code.
I did the following way but it didn't work:
My pytest setup is as follows:
Beta Was this translation helpful? Give feedback.
All reactions