Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_reading_color_palette: specify colormode #41

Merged
merged 1 commit into from
Jul 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ def test_colorful_obj_color_auto_detection(env, expected):
os.environ = os_env_backup


@pytest.mark.skipif(not sys.stdout.isatty(), reason='fails without a tty')
def test_reading_color_palette(tmpdir):
"""
Test reading color palette from file
Expand All @@ -464,7 +463,7 @@ def test_reading_color_palette(tmpdir):
0 0 0 myBlack
255 255 255 myWhite""")

colorful = core.Colorful(colorpalette=str(palette_file))
colorful = core.Colorful(colormode=terminal.ANSI_8_COLORS, colorpalette=str(palette_file))
assert str(colorful.myBlack) == '\033[30m'
assert str(colorful.myWhite) == '\033[37m'

Expand Down