Skip to content

Commit

Permalink
Merge pull request #46 from p-himik/master
Browse files Browse the repository at this point in the history
Added test for conflicting multiple class selector
  • Loading branch information
rennat committed Sep 20, 2016
2 parents ef1a856 + 83b0f5e commit 12f4bf3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,13 @@ def test_multiple_class_selector(self):
output = Pynliner().from_string(html).with_cssString(css).run()
self.assertEqual(output, expected)

def test_conflicting_multiple_class_selector(self):
html = """<h1 class="a b">Hello World!</h1><h1 class="a">I should not be changed</h1>"""
css = """h1.a.b { color: red; }"""
expected = u'<h1 class="a b" style="color: red">Hello World!</h1><h1 class="a">I should not be changed</h1>'
output = Pynliner().from_string(html).with_cssString(css).run()
self.assertEqual(output, expected)

def test_combination_selector(self):
html = """<h1 id="a" class="b">Hello World!</h1>"""
css = """h1#a.b { color: red; }"""
Expand Down

0 comments on commit 12f4bf3

Please sign in to comment.