-
Notifications
You must be signed in to change notification settings - Fork 26
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
Report memory limit and allocated memory in longrepr #5
Conversation
Refactor limit_memory to return a schema-based type, which can be converted to a PytestSectio and a longrepr string. Remove item.nodeid from longrepr since longrepr is only used by junit-xml parser and the structure of the xml document makes the item.nodeid in the error message redundant. Add a test that parses the resulting xml file to make sure the expected string was written.
@petr-tik can you try to resolve the merge conflicts? |
n3_detailed_longrepr
@gaborbernat i have. please take a look when you can |
Convert both FailedTestMemoryInfo methods into properties Regularise indentation, code style, explicit None returns, type hints
Thanks for the detailed review with code style and refactor suggestions. Addressed all of them. Only have 1 REVIEW comment about the name of the dataclass, happy to remove the comment, if you find the type name descriptive enough. |
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want me to edit the PR message before merging? |
If you have any amendments you think makes sense, sure 👍 |
i wanted to tidy it up and leave a descriptive commit message in main |
Go ahead with that then 👍 |
Done. I am guessing you are the one with squash and merge rights? |
Thanks a lot @petr-tik for the fantastic work and for persuing getting this fixed ❤️ And thanks a lot @gaborbernat for the review! 💪 |
oh, my PR message wasn't included in the commit. Thanks for the detailed review. Absolute pleasure |
Make the longrepr more descriptive and enrich the xml output with
this information.
Refactor limit_memory to return a
_MemoryInfo
type, whichcan be presented as a PytestSection and a longrepr string.
Remove item.nodeid from longrepr since longrepr is only used by
junit-xml parser and the structure of the xml document
makes the item.nodeid in the error message redundant.
Testing performed
Add a test that parses the resulting xml file to make sure
the expected string was written.
Issue number of the reported bug or feature request: #3