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.

Is "-s" visible as a fixture?

See original GitHub issue

Hi all,

I wonder if I can enable/disable my own printing facilities based on whether the “-s” option is passed to pytest command line, as muting the printing still doesn’t get rid of the overheads of printing (in my case very high …). Is “-s” observable through some fixture or hacks? Or is it possble to know the exact command line that invoked the test, so that I can search for “-s” on my own?

def test(print_on):
  if print_on: print(xxx)

This is what I found in pytest source code.

    group._addoption(
        "-s",
        action="store_const",
        const="no",
        dest="capture",
        help="shortcut for --capture=no.",
    )

Thanks, Shunning

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jsn1993commented, Feb 13, 2020

Thanks guys!

1reaction
jsn1993commented, Feb 13, 2020

ok!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lighting fixture communicating in infrared and visible for ...
In this paper, we propose a full optical wireless bidirectional communication system based on infrared (IR) and Visible Light Communication (VLC) for indoor ......
Read more >
Fixtures, Faucets and Fixture Fittings - 422.6 Clinical sink.
❖ A clinical sink is the main special fixture used in health care facilities. It is designed to both wash a bedpan and...
Read more >
Sea Turtles and Lights | FWC
Fixture must be able to shield the bulb, lamp, or glowing lens from the beach. *A list of the Florida Fish and Wildlife...
Read more >
Innovations 205-SN-S-G202-6 3 Light Adjustable Bathroom ...
Innovations 205-SN-S-G202-6 3 Light Adjustable Bathroom Fixture, Brushed Satin Nickel ; Item model number, ‎205-SN-S-G202-6 ; Is Discontinued By Manufacturer, ‎No.
Read more >
LED Beam Visualization in MA3D
By default, LED fixtures visualized in MA 3D will only illuminate the face of the fixture itself, rather than creating a visible beam....
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