Closed petr-tik closed 2 years ago
Thanks for the issue @petr-tik .
This has been fixed by https://github.com/bloomberg/pytest-memray/pull/4
thanks for the swift turnaround! I was actually quite keen to try this myself, but didn't manage to make tox run the tests.
can you please include some getting started instructions for potential new contributors?
I was wondering if the longrepr error message can include more informative output along the lines of:
test {item.nodeid} failed because it was limited to {limit_from_the_memray_marker} and allocated {item.max_allocated_memory} was allocated
I was wondering if the longrepr error message can include more informative output along the lines of:
It could, but at the level, this is happening there could be more different markers, so we need some map from the marker to the error template. This can be a fantastic contribution if you are interested.
thanks for the swift turnaround! I was actually quite keen to try this myself, but didn't manage to make tox run the tests.
Oh :( What problems are you experiencing when you ran tox
? Could you paste them here or maybe opening a new issue?
this is happening there could be more different markers, so we need some map from the marker to the error template
what other markers do you have in mind? I can think of xfail and its custom derivations. Either way, I would be happy to attempt to generate something more informative using the information collected by memray. You might know a certain financial services company that is partial to junit xml test output!
Oh :( What problems are you experiencing when you ran
tox
? Could you paste them here or maybe opening a new issue?
Am I supposed to run tox or is there any other way to run python tests? I only have python3.8 installed on my box, so I wouldn't want to run tox on all environments.
Am I supposed to run tox or is there any other way to run python tests? I only have python3.8 installed on my box, so I wouldn't want to run tox on all environments.
You can run tox -e py38
to only run the 3.8 version but if you want to avoid tox
in any case you can create a virtual environment, run make test-install
(or install the requirement files in the root of the project) then you can run the tests by running pytest tests
or make check
.
I would be happy to attempt to generate something more informative using the information collected by memray. You might know a certain financial services company that is partial to junit xml test output!
That would be fantastic. We created the plugin as an example of the tooling that can be built with memray (some of the APIs used here are not stable yet, but there will be) so we are super excited to see what the community can come up with :)
We don't have any specific new markers in mind at the time as we are focusing currently in fixing existing edges with the profiler directly but I think this is an area where we can greatly improve. Any contribution or idea here is welcomed!
I opened a prototype PR, would be great to get your thoughts.
Thanks again for open sourcing this
Will try to review this tomorrow. Thanks a lot for your work!
Bug Report
Current Behavior A clear and concise description of the behavior.
Input Code
put this in a file called
test_memray_marker.py
Expected behavior/code
Running this completes successfully without throwing InternalError - AssertionError
Environment
Additional context/Screenshots
Thanks for the awesome pytest plugin!