mirror of https://github.com/zulip/zulip.git
Reach 100% branch coverage for CSS parser.
This commit is contained in:
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 = '''
|
||||
|
|
Loading…
Reference in New Issue