Giter VIP home page Giter VIP logo

Comments (9)

js-dieu avatar js-dieu commented on June 1, 2024 6

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.

from pytest-monitor.

js-dieu avatar js-dieu commented on June 1, 2024 2

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.

from pytest-monitor.

dremdem avatar dremdem commented on June 1, 2024

As discussed here #38 pytest almost fully supports unittest, but currently pytest-monitor skips all unittest-based tests.

I originally proposed to document this, but it was suggested that perhaps this can be fixed and pytest-monitor could support unittest-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 ;)

from pytest-monitor.

js-dieu avatar js-dieu commented on June 1, 2024

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.

from pytest-monitor.

ChaoticRoman avatar ChaoticRoman commented on June 1, 2024

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

from pytest-monitor.

ChaoticRoman avatar ChaoticRoman commented on June 1, 2024

Follow up: It is working here outside of the pytest-monitor:

https://github.com/ChaoticRoman/pytest-monitor-example/blob/custom_memory_profiler/unittestit.py

from pytest-monitor.

js-dieu avatar js-dieu commented on June 1, 2024

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!

from pytest-monitor.

ChaoticRoman avatar ChaoticRoman commented on June 1, 2024

Bloomberg guys just released this: https://github.com/bloomberg/memray

Will check it out and let you know.

from pytest-monitor.

ChaoticRoman avatar ChaoticRoman commented on June 1, 2024

Memray and pytest-memray looks cool but have this exactly same issue, reported: bloomberg/pytest-memray#6

from pytest-monitor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.