Test ensuring text isnt rendered when text-opacity 0

This commit is contained in:
Darren Burns
2022-09-14 18:02:48 +01:00
parent 4668b4a0d8
commit d632091d93

View File

@@ -19,10 +19,9 @@ def test_simple_text_opacity(text):
) )
def test_value_zero_sets_foreground_color_to_background_color(text): def test_value_zero_doesnt_render_the_text(text):
foreground = background = "0;255;0"
assert render(TextOpacity(text, opacity=0)) == ( assert render(TextOpacity(text, opacity=0)) == (
f"\x1b[38;2;{foreground};48;2;{background}mHello, world!{STOP}" f"\x1b[48;2;0;255;0m {STOP}"
) )