Merge pull request #2170 from felixonmars/patch-1

Fix test_format_xml with dot in path
This commit is contained in:
Maximilian Hils 2017-03-16 12:34:01 +01:00 committed by GitHub
commit 6c0bbcc9ee

View File

@ -23,7 +23,7 @@ def test_format_xml(filename):
path = data.path(filename) path = data.path(filename)
with open(path) as f: with open(path) as f:
input = f.read() input = f.read()
with open(path.replace(".", "-formatted.")) as f: with open("-formatted.".join(path.rsplit(".", 1))) as f:
expected = f.read() expected = f.read()
tokens = xml_html.tokenize(input) tokens = xml_html.tokenize(input)
assert xml_html.format_xml(tokens) == expected assert xml_html.format_xml(tokens) == expected