mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
Reach 100% branch coverage for CSS parser.
This commit is contained in:
committed by
Steve Howell
parent
911634d1d4
commit
87b87621fe
@@ -48,6 +48,20 @@ class ParserTestHappyPath(unittest.TestCase):
|
||||
declaration = block.declarations[0]
|
||||
self.assertIn('/* comment here */', declaration.text())
|
||||
|
||||
def test_no_semicolon(self):
|
||||
# type: () -> None
|
||||
my_css = '''
|
||||
p { color: red }
|
||||
'''
|
||||
|
||||
res = parse(my_css)
|
||||
|
||||
self.assertEqual(res.text(), my_css)
|
||||
|
||||
section = cast(CssSection, res.sections[0])
|
||||
|
||||
self.assertFalse(section.declaration_block.declarations[0].semicolon)
|
||||
|
||||
def test_multi_line_selector(self):
|
||||
# type: () -> None
|
||||
my_css = '''
|
||||
|
||||
Reference in New Issue
Block a user