We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 092a1c5 commit 8a538ccCopy full SHA for 8a538cc
Lib/test/test_platform.py
@@ -762,14 +762,13 @@ def invoke_platform(self, *flags):
762
platform._main(args=flags)
763
return output.getvalue()
764
765
- @support.force_not_colorized
766
def test_unknown_flag(self):
767
- output = io.StringIO()
768
with self.assertRaises(SystemExit):
+ output = io.StringIO()
769
# suppress argparse error message
770
with contextlib.redirect_stderr(output):
771
_ = self.invoke_platform('--unknown')
772
- self.assertStartsWith(output.getvalue(), "usage: ")
+ self.assertStartsWith(output, "usage: ")
773
774
def test_invocation(self):
775
flags = (
0 commit comments