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.
2 parents b0408fa + 15b0e9d commit 00895ebCopy full SHA for 00895eb
pytest-shutil/pytest_shutil/cmdline.py
@@ -52,6 +52,8 @@ def chdir(dirname):
52
class PrettyFormatter(object):
53
def __init__(self, color=True):
54
from termcolor import colored
55
+ if color is False:
56
+ os.environ["FORCE_COLOR"] = "true"
57
self.color = color
58
self.colored = colored
59
self.buffer = []
pytest-shutil/tests/unit/test_cmdline.py
@@ -10,7 +10,8 @@ def test_umask(workspace):
10
f.touch()
11
assert (f.stat().st_mode & 0o777) == 0o464
12
13
-def test_pretty_formatter():
+def test_pretty_formatter(monkeypatch):
14
+ monkeypatch.setenv("FORCE_COLOR", "1")
15
f = cmdline.PrettyFormatter()
16
f.title('A Title')
17
f.hr()
0 commit comments