33
44from __future__ import unicode_literals
55from decimal import Decimal
6+ import os
67
78import pytest
89
2930import types
3031
3132
33+ @pytest .fixture
34+ def TwoFiftySixColor ():
35+ # todo: finalize this fixture by resetting the env value
36+ os .environ ["COLORTERM" ] = ""
37+
38+
3239def test_convert_to_string ():
3340 """Test the convert_to_string() function."""
3441 data = [[1 , "John" ], [2 , "Jill" ]]
@@ -60,7 +67,7 @@ def test_override_missing_values():
6067
6168
6269@pytest .mark .skipif (not HAS_PYGMENTS , reason = "requires the Pygments library" )
63- def test_override_missing_value_with_style ():
70+ def test_override_missing_value_with_style (TwoFiftySixColor ):
6471 """Test that *override_missing_value()* styles output."""
6572
6673 class NullStyle (Style ):
@@ -185,7 +192,7 @@ def test_style_output_no_pygments():
185192
186193
187194@pytest .mark .skipif (not HAS_PYGMENTS , reason = "requires the Pygments library" )
188- def test_style_output ():
195+ def test_style_output (TwoFiftySixColor ):
189196 """Test that *style_output()* styles output."""
190197
191198 class CliStyle (Style ):
@@ -210,7 +217,7 @@ class CliStyle(Style):
210217
211218
212219@pytest .mark .skipif (not HAS_PYGMENTS , reason = "requires the Pygments library" )
213- def test_style_output_with_newlines ():
220+ def test_style_output_with_newlines (TwoFiftySixColor ):
214221 """Test that *style_output()* styles output with newlines in it."""
215222
216223 class CliStyle (Style ):
@@ -238,7 +245,7 @@ class CliStyle(Style):
238245
239246
240247@pytest .mark .skipif (not HAS_PYGMENTS , reason = "requires the Pygments library" )
241- def test_style_output_custom_tokens ():
248+ def test_style_output_custom_tokens (TwoFiftySixColor ):
242249 """Test that *style_output()* styles output with custom token names."""
243250
244251 class CliStyle (Style ):
0 commit comments