Open stas00 opened 3 years ago
Thanks for the suggestion.
As stated in the PR #38 I need to understand both sequence and objects that lies beneath. I'll put details about that here for clarity's sake.
As discussed here #38
pytest
almost fully supportsunittest
, but currentlypytest-monitor
skips allunittest
-based tests.I originally proposed to document this, but it was suggested that perhaps this can be fixed and
pytest-monitor
could supportunittest
-based tests too, which would be awesome.So as suggested opening this Issue to track the feasibility/progress on this front.
Will be waiting for unittest support ;)
Hello
I've been more busy than expected but I have been able to made some progress. It does not seem feasible to "inject" the probing system of pytest-monitor for unittest function/classes (The probe relies on Generic Test item with standard testing protocol).
However, I've found an interesting way of injection that seems promising. I'll try to dig in the next days.
Hello @dremdem @stas00
I managed to intercept the test function for each unittest. I can obtain measures which seems fine. I am actually a bit stuck for reporting these measures since I have no access to the session. I tried to use hook reports, but I am unsuccessful so far. I have other ideas to manage my way through the unittest protocol but it seems hacky.
Keep you posted.
Dear @js-dieu,
thank you for the great plugin! Would you mind to share your progress in a branch? This feature would help me a lot and maybe I can help with the progress.
Regards
Roman
Follow up: It is working here outside of the pytest-monitor:
https://github.com/ChaoticRoman/pytest-monitor-example/blob/custom_memory_profiler/unittestit.py
Hello @ChaoticRoman
I unfortunately lost the development after entering an erroneous command. That being said, I might be able to recode what I did, though your snippet is neat for starting it again. Keep you posted!
Bloomberg guys just released this: https://github.com/bloomberg/memray
Will check it out and let you know.
Memray and pytest-memray looks cool but have this exactly same issue, reported: https://github.com/bloomberg/pytest-memray/issues/6
As discussed here https://github.com/CFMTech/pytest-monitor/pull/38
pytest
almost fully supportsunittest
, but currentlypytest-monitor
skips allunittest
-based tests.I originally proposed to document this, but it was suggested that perhaps this can be fixed and
pytest-monitor
could supportunittest
-based tests too, which would be awesome.So as suggested opening this Issue to track the feasibility/progress on this front.