Skip to content

Commit

Permalink
TST: Always use / in URLs for visual results.
Browse files Browse the repository at this point in the history
Backslashes are not valid separators in URLs and maybe only work in IE.
  • Loading branch information
QuLogic committed Feb 18, 2016
1 parent 0805e16 commit 3e55060
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions visual_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ def run():
fn, fext = os.path.splitext(file)
if fext != ".png":
continue
# Always use / for URLs.
if "-failed-diff" in fn:
pictures[fn[:-12]]["f"] = os.path.join(subdir, file)
pictures[fn[:-12]]["f"] = "/".join((subdir, file))
elif "-expected" in fn:
pictures[fn[:-9]]["e"] = os.path.join(subdir, file)
pictures[fn[:-9]]["e"] = "/".join((subdir, file))
else:
pictures[fn]["c"] = os.path.join(subdir, file)
pictures[fn]["c"] = "/".join((subdir, file))

_body += "<h2>{0}</h2>".format(subdir)
_body += "<table>\n<thead><td>name</td><td>actual</td><td>expected</td><td>diff</td></thead>\n"
for name, test in six.iteritems(pictures):
Expand Down

0 comments on commit 3e55060

Please sign in to comment.