Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test for issue #22 #23

Merged
merged 2 commits into from
Jun 20, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def test_attribute_selector_match(self):
expected = u'<h1 title="foo" style="color: red">Hello World!</h1>'
output = Pynliner().from_string(html).with_cssString(css).run()
self.assertEqual(output, expected)

def test_attribute_selector_no_match(self):
html = """<h1 title="bar">Hello World!</h1>"""
css = """h1[title="foo"] { color: red; }"""
Expand All @@ -417,6 +417,12 @@ def test_unicode_content(self):
output = Pynliner().from_string(html).with_cssString(css).run()
self.assertEqual(output, expected)

def test_conditional_comments(self):
html = """<div><!--[if mso]>content
<![endif]-->content<!--[if mso]>content<![endif]-->
</div>"""
output = Pynliner().from_string(html).run()
self.assertEqual(output, html)


if __name__ == '__main__':
Expand Down