From 84dcb911196783cde209b095acc26d4089a24200 Mon Sep 17 00:00:00 2001 From: Edgar Geier Date: Mon, 22 Jul 2019 20:23:59 +0200 Subject: [PATCH] Change test to remove missed branch --- tests/color_test.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/color_test.py b/tests/color_test.py index fb311c85..4ba3f327 100644 --- a/tests/color_test.py +++ b/tests/color_test.py @@ -54,9 +54,7 @@ def test_use_color_raises_if_given_shenanigans(): def test_no_color_env_unset(): - with mock.patch.dict(os.environ): - if 'NO_COLOR' in os.environ: - del os.environ['NO_COLOR'] + with mock.patch.dict(os.environ, clear=True): assert use_color('always') is True