mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Test that text-justify property with empty value uses default
This commit is contained in:
@@ -1141,10 +1141,16 @@ class TestParseTextJustify:
|
||||
assert stylesheet.rules[0].styles.text_justify == valid_justify
|
||||
|
||||
def test_text_justify_invalid(self):
|
||||
css = "#foo { text-justify: invalid-value }"
|
||||
css = "#foo { text-justify: invalid-value; }"
|
||||
stylesheet = Stylesheet()
|
||||
with pytest.raises(StylesheetParseError):
|
||||
stylesheet.add_source(css)
|
||||
stylesheet.parse()
|
||||
rules = stylesheet._parse_rules(css, "foo")
|
||||
assert rules[0].errors
|
||||
|
||||
def test_text_justify_empty_uses_default(self):
|
||||
css = "#foo { text-justify: ; }"
|
||||
stylesheet = Stylesheet()
|
||||
stylesheet.add_source(css)
|
||||
assert stylesheet.rules[0].styles.text_justify == "left"
|
||||
|
||||
Reference in New Issue
Block a user