Description
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
:
Lines 501 to 507 in 2bfafc9
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)