Skip to content

Commit a337f59

Browse files
committed
Doing some more normalizing to get rid of diffs we don't care about
- Legacy-Id: 425
1 parent 9180eb2 commit a337f59

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

test/check_url

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,14 @@ for url in sys.argv[1:]:
3838
url1 = tuple[2]
3939
url2 = django_server + tuple[1]
4040
print "Fetching %s ..." % url1
41-
text1 = html2text(fetch(url1)).split("\n")
41+
text1 = html2text(fetch(url1), fill=False)
42+
text1 = text1.replace('."', '".').replace(',"', '",')
43+
list1 = text1.split("\n")
4244
print "Fetching %s ..." % url2
43-
text2 = html2text(fetch(url2)).split("\n")
44-
diff = "\n".join(unified_diff(text1, text2, url1, url2, "", "", 3, lineterm=""))
45+
text2 = html2text(fetch(url2), fill=False)
46+
text2 = text2.replace('."', '".').replace(',"', '",')
47+
list2 = text2.split("\n")
48+
diff = "\n".join(unified_diff(list1, list2, url1, url2, "", "", 0, lineterm=""))
4549
if diff:
4650
print diff
4751
else:

0 commit comments

Comments
 (0)