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.

Make PipTestEnvironment stderr checks more assertive

See original GitHub issue

We can tighten the tests in the following way. Rename the PipTestEnvironment.run() arguments of allow_stderr_warning and allow_stderr_error arguments to expect_stderr_warning and expect_stderr_error:

https://github.com/pypa/pip/blob/2bfafc9b70f76ec0b019c96311cb437e739b21e2/tests/lib/__init__.py#L501-L507

and make the test fail if the argument is passed and a warning or error isn’t present, respectively. The idea is that the argument should only be passed if it’s actually needed, unlike the current case where the test is passing if the argument is provided unnecessarily.

Also, to do this it might be necessary to do a check of some kind to know if the argument should be passed. For example, whether a deprecation warning is emitted can depend on what version is running.

Posted in its original form by @cjerdonek in #161 (comment)

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
atugushevcommented, Mar 5, 2020

Hey @ssurbhi560. Thanks for pinging me! Can’t really find a time to get this done. Would you like to pick it up? Please, feel free to 🙏

1reaction
ssurbhi560commented, Aug 26, 2020

Hey @gutsytechster! I won’t be able to work on this right now, feel free to work on it. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I pipe stderr and still test if the command failed?
When I run the script without piping to logger, everything is fine. When I pipe everything to logger for review at a later...
Read more >
turnt: Docs, Tutorials, Reviews | Openbase
Tiny Unified Runner N' Tester (Turnt). Turnt is a simple snapshot testing tool inspired by Cram and LLVM's lit. It's good for testing...
Read more >
avocado Documentation - Read the Docs
Avocado is a set of tools and libraries to help with automated testing. One can call it a test framework with benefits. Native...
Read more >
Galaxy Tool XML File
* aggressive : adds checks for non zero exit codes, and checks for Exception: , Error: in the standard error. Additionally checks for...
Read more >
My Document - Adaptive Computing
and instructions for how to set up and use compute node checks. ... make and make install that works across all Linux distributions...
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