question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add support for unittests (via pytest)

See original GitHub issue

As discussed here https://github.com/CFMTech/pytest-monitor/pull/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.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:9

github_iconTop GitHub Comments

6reactions
js-dieucommented, May 25, 2021

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.

2reactions
js-dieucommented, May 3, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use unittest-based tests with pytest
pytest supports running Python unittest -based tests out of the box. It's meant for leveraging existing unittest -based test suites to use pytest...
Read more >
A Guide to Python Unit Testing with unittest and pytest
Learn what software testing is, and how to run Python unit tests with unittest and pytest, two key frameworks for Python unit testing....
Read more >
Effective Python Testing With Pytest
In this tutorial, you'll learn how to take your testing to the next level with pytest. You'll cover intermediate and advanced pytest ......
Read more >
Pytest Tutorial: A hands-on guide to unit testing - DataCamp
In this article, we will focus on unit tests and, specifically, how to do them using a popular Python testing framework called Pytest....
Read more >
unittest — Unit testing framework — Python 3.11.1 ...
The unittest unit testing framework was originally inspired by JUnit and has a similar flavor as major unit testing frameworks in other languages....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found