Monitor usage resulting in repeated printing
See original GitHub issueDescribe the bug I use captured print statements to build test reports. In using pytest-monitor, I notice that its usage produces the effect of repeating these statements.
To Reproduce Steps to reproduce the behavior:
- Create a simple hello-world pytest function.
- Run the test with the
-s
flag to allow printing to console, observe multiple statements. - Run again but include
-p no:monitor
, observe single statement.
Expected behavior The printing of a single statement.
Screenshots
Desktop (please complete the following information):
- OS: Pop!_OS 20.04LTS
- Python 3.7.8
- Pytest 6.0.2
- Other plugins: metadata, html
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
Printer keeps printing the same page automatically
Method 1: Run the Printer troubleshooter and check if it helps. Follow the steps to run the troubleshooter: a. Press ...
Read more >13 Common Printer Problems and How to Fix Them
These parts have also been known to cause a jams after repeated use and eventually may need to be replaced.
Read more >Printer Turns Off Unexpectedly or Repeatedly - HP Support
The printer suddenly turns off without warning. A print, copy, scan, or fax job fails because power might be low or the printer...
Read more >Solve printing problems on Mac - Apple Support (HK)
Choose Apple menu > System Settings, then click Printers & Scanners in the sidebar. (You may have to scroll down.) Click the printer...
Read more >Everything You Need To Know About Screen Printing by Inkwell
Any designs that are created with the screen printing method can use multiple shades of ink. However, with a multi-colored design, it is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After some investigations, I think the problem is related to memory_profiler. The following example illustrates the problem you are experiencing:
This prints the following on my machine:
If I remove the memory profiling part from the plugin, the output is as expected. I’ll ask for some support to memory_profiler.
Edit: https://github.com/pythonprofilers/memory_profiler/issues/298
Hello @csheaff
Thanks for reporting. It is a bit weird to me as I do not play at all with capture fixtures nor the way pytest handles logs and prints. I might be hard to analyze and debug but I’ll try to have a look this week prior to the upcoming release of pytest-monitor.