Skip to content

Commit d4a5017

Browse files
committed
Fix a test on py3.14 by setting NO_COLOR=1
1 parent baa61a5 commit d4a5017

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nose2/tests/unit/test_plugin_api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from unittest import mock
2+
13
from nose2 import events, session
24
from nose2.tests._common import TestCase
35

@@ -16,7 +18,8 @@ def setUp(self):
1618
super(TestCase, self).setUp()
1719

1820
def test_add_option_adds_option(self):
19-
helpt = self.session.argparse.format_help()
21+
with mock.patch.dict("os.environ", {"NO_COLOR": "1"}):
22+
helpt = self.session.argparse.format_help()
2023
assert "-X, --xxx" in helpt, (
2124
"commandLineSwitch arg not found in help text: %s" % helpt
2225
)

0 commit comments

Comments
 (0)