Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c0728d2

Browse files
committed
Merge pull request matplotlib#6029 from QuLogic/tests-valid-url
TST: Always use / in URLs for visual results.
2 parents 236411c + 3e55060 commit c0728d2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

visual_tests.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,14 @@ def run():
4343
fn, fext = os.path.splitext(file)
4444
if fext != ".png":
4545
continue
46+
# Always use / for URLs.
4647
if "-failed-diff" in fn:
47-
pictures[fn[:-12]]["f"] = os.path.join(subdir, file)
48+
pictures[fn[:-12]]["f"] = "/".join((subdir, file))
4849
elif "-expected" in fn:
49-
pictures[fn[:-9]]["e"] = os.path.join(subdir, file)
50+
pictures[fn[:-9]]["e"] = "/".join((subdir, file))
5051
else:
51-
pictures[fn]["c"] = os.path.join(subdir, file)
52-
52+
pictures[fn]["c"] = "/".join((subdir, file))
53+
5354
_body += "<h2>{0}</h2>".format(subdir)
5455
_body += "<table>\n<thead><td>name</td><td>actual</td><td>expected</td><td>diff</td></thead>\n"
5556
for name, test in six.iteritems(pictures):

0 commit comments

Comments
 (0)