We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
NO_COLOR=1
1 parent baa61a5 commit d4a5017Copy full SHA for d4a5017
nose2/tests/unit/test_plugin_api.py
@@ -1,3 +1,5 @@
1
+from unittest import mock
2
+
3
from nose2 import events, session
4
from nose2.tests._common import TestCase
5
@@ -16,7 +18,8 @@ def setUp(self):
16
18
super(TestCase, self).setUp()
17
19
20
def test_add_option_adds_option(self):
- helpt = self.session.argparse.format_help()
21
+ with mock.patch.dict("os.environ", {"NO_COLOR": "1"}):
22
+ helpt = self.session.argparse.format_help()
23
assert "-X, --xxx" in helpt, (
24
"commandLineSwitch arg not found in help text: %s" % helpt
25
)
0 commit comments