diff --git a/linkcheck/ftests/__init__.py b/linkcheck/ftests/__init__.py index d5c86ba8..7e72fa86 100644 --- a/linkcheck/ftests/__init__.py +++ b/linkcheck/ftests/__init__.py @@ -48,7 +48,7 @@ class TestLogger (linkcheck.logger.Logger): def new_url (self, url_data): """append logger output to self.result""" if self.has_field('url'): - url = u"url %s" % unicode(repr(url_data.base_url)[1:]) + url = u"url %s" % url_data.base_url if url_data.cached: url += u" (cached)" self.result.append(url) diff --git a/linkcheck/ftests/data/anchor.html.result b/linkcheck/ftests/data/anchor.html.result index 1309b049..14776f6f 100644 --- a/linkcheck/ftests/data/anchor.html.result +++ b/linkcheck/ftests/data/anchor.html.result @@ -1,9 +1,9 @@ -url 'file://%(curdir)s/linkcheck/ftests/data/anchor.html' +url file://%(curdir)s/linkcheck/ftests/data/anchor.html cache key file://%(curdir)s/linkcheck/ftests/data/anchor.html real url file://%(curdir)s/linkcheck/ftests/data/anchor.html valid -url '#myid' +url #myid cache key file://%(curdir)s/linkcheck/ftests/data/anchor.html#myid real url file://%(curdir)s/linkcheck/ftests/data/anchor.html name Bla diff --git a/linkcheck/ftests/data/base1.html.result b/linkcheck/ftests/data/base1.html.result index 77e60abc..11def645 100644 --- a/linkcheck/ftests/data/base1.html.result +++ b/linkcheck/ftests/data/base1.html.result @@ -1,14 +1,14 @@ -url 'file://%(curdir)s/linkcheck/ftests/data/base1.html' +url file://%(curdir)s/linkcheck/ftests/data/base1.html cache key file://%(curdir)s/linkcheck/ftests/data/base1.html real url file://%(curdir)s/linkcheck/ftests/data/base1.html valid -url 'base2.html' +url base2.html cache key file://%(curdir)s/linkcheck/ftests/data/base2.html real url file://%(curdir)s/linkcheck/ftests/data/base2.html valid -url 'base2.html' (cached) +url base2.html (cached) cache key file://%(curdir)s/linkcheck/ftests/data/base2.html real url file://%(curdir)s/linkcheck/ftests/data/base2.html valid diff --git a/linkcheck/ftests/data/base2.html.result b/linkcheck/ftests/data/base2.html.result index b3a662b7..7a74a623 100644 --- a/linkcheck/ftests/data/base2.html.result +++ b/linkcheck/ftests/data/base2.html.result @@ -1,9 +1,9 @@ -url 'file://%(curdir)s/linkcheck/ftests/data/base2.html' +url file://%(curdir)s/linkcheck/ftests/data/base2.html cache key file://%(curdir)s/linkcheck/ftests/data/base2.html real url file://%(curdir)s/linkcheck/ftests/data/base2.html valid -url 'test.txt' +url test.txt cache key file://%(curdir)s/linkcheck/ftests/data/base/test.txt real url file://%(curdir)s/linkcheck/ftests/data/base/test.txt baseurl file://%(curdir)s/linkcheck/ftests/data/base/ diff --git a/linkcheck/ftests/data/base3.html.result b/linkcheck/ftests/data/base3.html.result index 66221ce3..7ac52ed9 100644 --- a/linkcheck/ftests/data/base3.html.result +++ b/linkcheck/ftests/data/base3.html.result @@ -1,9 +1,9 @@ -url 'file://%(curdir)s/linkcheck/ftests/data/base3.html' +url file://%(curdir)s/linkcheck/ftests/data/base3.html cache key file://%(curdir)s/linkcheck/ftests/data/base3.html real url file://%(curdir)s/linkcheck/ftests/data/base3.html valid -url 'test.txt' +url test.txt cache key file://%(curdir)s/linkcheck/ftests/data/base/test.txt real url file://%(curdir)s/linkcheck/ftests/data/base/test.txt baseurl file://%(curdir)s/linkcheck/ftests/data/base/ diff --git a/linkcheck/ftests/data/file.asc.result b/linkcheck/ftests/data/file.asc.result index 40e800c4..043d1f72 100644 --- a/linkcheck/ftests/data/file.asc.result +++ b/linkcheck/ftests/data/file.asc.result @@ -1,4 +1,4 @@ -url 'file://%(curdir)s/linkcheck/ftests/data/file.asc' +url file://%(curdir)s/linkcheck/ftests/data/file.asc cache key file://%(curdir)s/linkcheck/ftests/data/file.asc real url file://%(curdir)s/linkcheck/ftests/data/file.asc valid diff --git a/linkcheck/ftests/data/file.css.result b/linkcheck/ftests/data/file.css.result index b2492e4f..fb858261 100644 --- a/linkcheck/ftests/data/file.css.result +++ b/linkcheck/ftests/data/file.css.result @@ -1,14 +1,14 @@ -url 'file://%(curdir)s/linkcheck/ftests/data/file.css' +url file://%(curdir)s/linkcheck/ftests/data/file.css cache key file://%(curdir)s/linkcheck/ftests/data/file.css real url file://%(curdir)s/linkcheck/ftests/data/file.css valid -url 'file.html' +url file.html cache key file://%(curdir)s/linkcheck/ftests/data/file.html real url file://%(curdir)s/linkcheck/ftests/data/file.html valid -url 'file.html' (cached) +url file.html (cached) cache key file://%(curdir)s/linkcheck/ftests/data/file.html real url file://%(curdir)s/linkcheck/ftests/data/file.html valid diff --git a/linkcheck/ftests/data/file.html.result b/linkcheck/ftests/data/file.html.result index 504dc983..b748b1a0 100644 --- a/linkcheck/ftests/data/file.html.result +++ b/linkcheck/ftests/data/file.html.result @@ -1,41 +1,41 @@ -url 'file://%(curdir)s/linkcheck/ftests/data/file.html' +url file://%(curdir)s/linkcheck/ftests/data/file.html cache key file://%(curdir)s/linkcheck/ftests/data/file.html real url file://%(curdir)s/linkcheck/ftests/data/file.html valid -url 'file.html' (cached) +url file.html (cached) cache key file://%(curdir)s/linkcheck/ftests/data/file.html real url file://%(curdir)s/linkcheck/ftests/data/file.html name relative url valid -url 'file.html#isnix' (cached) +url file.html#isnix (cached) cache key file://%(curdir)s/linkcheck/ftests/data/file.html real url file://%(curdir)s/linkcheck/ftests/data/file.html name bad anchor warning anchor #isnix not found valid -url 'file.html#iswas' (cached) +url file.html#iswas (cached) cache key file://%(curdir)s/linkcheck/ftests/data/file.html real url file://%(curdir)s/linkcheck/ftests/data/file.html name good anchor valid -url '#isnix' (cached) +url #isnix (cached) cache key file://%(curdir)s/linkcheck/ftests/data/file.html real url file://%(curdir)s/linkcheck/ftests/data/file.html name bad anchor warning anchor #isnix not found valid -url '#iswas' (cached) +url #iswas (cached) cache key file://%(curdir)s/linkcheck/ftests/data/file.html real url file://%(curdir)s/linkcheck/ftests/data/file.html name good anchor valid -url 'javascript:loadthis()' +url javascript:loadthis() cache key javascript:loadthis() real url javascript:loadthis() name javascript url diff --git a/linkcheck/ftests/data/file.txt.result b/linkcheck/ftests/data/file.txt.result index 55280d0f..d4a363bb 100644 --- a/linkcheck/ftests/data/file.txt.result +++ b/linkcheck/ftests/data/file.txt.result @@ -1,4 +1,4 @@ -url 'file://%(curdir)s/linkcheck/ftests/data/file.txt' +url file://%(curdir)s/linkcheck/ftests/data/file.txt cache key file://%(curdir)s/linkcheck/ftests/data/file.txt real url file://%(curdir)s/linkcheck/ftests/data/file.txt valid diff --git a/linkcheck/ftests/data/frames.html.result b/linkcheck/ftests/data/frames.html.result index 60165b9c..4ab739ac 100644 --- a/linkcheck/ftests/data/frames.html.result +++ b/linkcheck/ftests/data/frames.html.result @@ -1,14 +1,14 @@ -url 'file://%(curdir)s/linkcheck/ftests/data/frames.html' +url file://%(curdir)s/linkcheck/ftests/data/frames.html cache key file://%(curdir)s/linkcheck/ftests/data/frames.html real url file://%(curdir)s/linkcheck/ftests/data/frames.html valid -url 'frames.html' (cached) +url frames.html (cached) cache key file://%(curdir)s/linkcheck/ftests/data/frames.html real url file://%(curdir)s/linkcheck/ftests/data/frames.html valid -url 'frames.html' (cached) +url frames.html (cached) cache key file://%(curdir)s/linkcheck/ftests/data/frames.html real url file://%(curdir)s/linkcheck/ftests/data/frames.html valid diff --git a/linkcheck/ftests/data/http.html.result b/linkcheck/ftests/data/http.html.result index 50c79d10..3879a458 100644 --- a/linkcheck/ftests/data/http.html.result +++ b/linkcheck/ftests/data/http.html.result @@ -1,129 +1,129 @@ -url 'http://localhost:8001/linkcheck/ftests/data/http.html' +url http://localhost:8001/linkcheck/ftests/data/http.html cache key http://localhost:8001/linkcheck/ftests/data/http.html real url http://localhost:8001/linkcheck/ftests/data/http.html valid -url 'http://www.garantiertnixgutt.bla/' +url http://www.garantiertnixgutt.bla/ cache key http://www.garantiertnixgutt.bla/ real url http://www.garantiertnixgutt.bla/ name bad url error -url 'http://localhost:8001/' +url http://localhost:8001/ cache key http://localhost:8001/ real url http://localhost:8001/ name ok valid -url 'http:/localhost:8001/' +url http:/localhost:8001/ cache key http:///localhost%%3A8001/ real url http:///localhost%%3A8001/ name one slash warning Base URL is not properly normed. Normed url is 'http:///localhost%%3A8001/'. error -url 'http:localhost:8001/' (cached) +url http:localhost:8001/ (cached) cache key http:///localhost%%3A8001/ real url http:///localhost%%3A8001/ name no slash warning Base URL is not properly normed. Normed url is 'http:///localhost%%3A8001/'. error -url 'http://' +url http:// cache key http:/// real url http:/// name no url warning Base URL is not properly normed. Normed url is 'http:///'. error -url 'http:/' (cached) +url http:/ (cached) cache key http:/// real url http:/// name no url, one slash warning Base URL is not properly normed. Normed url is 'http:///'. error -url 'http:' (cached) +url http: (cached) cache key http:/// real url http:/// name no url, no slash warning Base URL is not properly normed. Normed url is 'http:///'. error -url 'http://localhost:8001/stalter&sohn' +url http://localhost:8001/stalter&sohn cache key http://localhost:8001/stalter%%26sohn real url http://localhost:8001/stalter%%26sohn name unquoted ampersand warning Base URL is not properly normed. Normed url is 'http://localhost:8001/stalter%%26sohn'. error -url 'http://slashdot.org/' +url http://slashdot.org/ cache key http://slashdot.org/ real url http://slashdot.org/ name unquoted valid -url 'HtTP://LoCAlHOst:8001/' (cached) +url HtTP://LoCAlHOst:8001/ (cached) cache key http://localhost:8001/ real url http://localhost:8001/ name should be cached warning Base URL is not properly normed. Normed url is 'http://localhost:8001/'. valid -url 'HTTP://LOCALHOST:8001/' (cached) +url HTTP://LOCALHOST:8001/ (cached) cache key http://localhost:8001/ real url http://localhost:8001/ name should be cached warning Base URL is not properly normed. Normed url is 'http://localhost:8001/'. valid -url 'http://localhost:8001/?d=directory&p=page' +url http://localhost:8001/?d=directory&p=page cache key http://localhost:8001/?d=directory&p=page real url http://localhost:8001/?d=directory&p=page name should not be cached valid -url 'http://localhost:8001/?d=directory&p=page1' +url http://localhost:8001/?d=directory&p=page1 cache key http://localhost:8001/?d=directory&p=page1 real url http://localhost:8001/?d=directory&p=page1 name should not be cached valid -url 'http://localhost:8001/?quoted=\xfc' +url http://localhost:8001/?quoted=\xfc cache key http://localhost:8001/?quoted=%%FC real url http://localhost:8001/?quoted=%%FC name html entities warning Base URL is not properly normed. Normed url is 'http://localhost:8001/?quoted=%%FC'. valid -url 'http://localhost:8001/' (cached) +url http://localhost:8001/ (cached) cache key http://localhost:8001/ real url http://localhost:8001/ valid -url 'http.html' (cached) +url http.html (cached) cache key http://localhost:8001/linkcheck/ftests/data/http.html real url http://localhost:8001/linkcheck/ftests/data/http.html valid -url 'http.html' (cached) +url http.html (cached) cache key http://localhost:8001/linkcheck/ftests/data/http.html real url http://localhost:8001/linkcheck/ftests/data/http.html valid -url 'http.html' (cached) +url http.html (cached) cache key http://localhost:8001/linkcheck/ftests/data/http.html real url http://localhost:8001/linkcheck/ftests/data/http.html name CSS urls valid -url 'http.html' (cached) +url http.html (cached) cache key http://localhost:8001/linkcheck/ftests/data/http.html real url http://localhost:8001/linkcheck/ftests/data/http.html name CSS urls valid -url 'http://localhost:8001/' (cached) +url http://localhost:8001/ (cached) cache key http://localhost:8001/ real url http://localhost:8001/ name no beginning quote diff --git a/linkcheck/ftests/data/norobots.html.result b/linkcheck/ftests/data/norobots.html.result index 40c462dc..ee14454c 100644 --- a/linkcheck/ftests/data/norobots.html.result +++ b/linkcheck/ftests/data/norobots.html.result @@ -1,4 +1,4 @@ -url 'file://%(curdir)s/linkcheck/ftests/data/norobots.html' +url file://%(curdir)s/linkcheck/ftests/data/norobots.html cache key file://%(curdir)s/linkcheck/ftests/data/norobots.html real url file://%(curdir)s/linkcheck/ftests/data/norobots.html valid diff --git a/linkcheck/ftests/data/urllist.txt.result b/linkcheck/ftests/data/urllist.txt.result index 58675687..5309af75 100644 --- a/linkcheck/ftests/data/urllist.txt.result +++ b/linkcheck/ftests/data/urllist.txt.result @@ -1,25 +1,25 @@ -url 'file://%(curdir)s/linkcheck/ftests/data/urllist.txt' +url file://%(curdir)s/linkcheck/ftests/data/urllist.txt cache key file://%(curdir)s/linkcheck/ftests/data/urllist.txt real url file://%(curdir)s/linkcheck/ftests/data/urllist.txt valid -url 'file.html' +url file.html cache key file://%(curdir)s/linkcheck/ftests/data/file.html real url file://%(curdir)s/linkcheck/ftests/data/file.html valid -url 'file.html#isnix' (cached) +url file.html#isnix (cached) cache key file://%(curdir)s/linkcheck/ftests/data/file.html real url file://%(curdir)s/linkcheck/ftests/data/file.html warning anchor #isnix not found valid -url 'file.html#iswas' (cached) +url file.html#iswas (cached) cache key file://%(curdir)s/linkcheck/ftests/data/file.html real url file://%(curdir)s/linkcheck/ftests/data/file.html valid -url 'javascript:loadthis()' +url javascript:loadthis() cache key javascript:loadthis() real url javascript:loadthis() warning Javascript url ignored diff --git a/linkcheck/ftests/test_error.py b/linkcheck/ftests/test_error.py index 7a0601f4..b556a01c 100644 --- a/linkcheck/ftests/test_error.py +++ b/linkcheck/ftests/test_error.py @@ -27,10 +27,10 @@ class TestError (linkcheck.ftests.StandardTest): def test_unrecognized (self): """unrecognized scheme test""" - url = "hutzli:" + url = u"hutzli:" nurl = linkcheck.url.url_norm(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key None", "real url %s" % nurl, "error", @@ -39,19 +39,19 @@ class TestError (linkcheck.ftests.StandardTest): def test_leading_whitespace (self): """leading whitespace test""" - url = " http://www.heise.de/" + url = u" http://www.heise.de/" nurl = linkcheck.url.url_norm(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key None", "real url %s" % nurl, "error", ] self.direct(url, resultlines) - url = "\nhttp://www.heise.de/" + url = u"\nhttp://www.heise.de/" nurl = linkcheck.url.url_norm(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key None", "real url %s" % nurl, "error", @@ -60,23 +60,23 @@ class TestError (linkcheck.ftests.StandardTest): def test_trailing_whitespace (self): """trailing whitespace test""" - url = "http://www.heise.de/ " + url = u"http://www.heise.de/ " nurl = linkcheck.url.url_norm(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % nurl, "real url %s" % nurl, - "warning Base URL is not properly normed. Normed url is %r." % nurl, + "warning Base URL is not properly normed. Normed url is %s." % nurl, "error", ] self.direct(url, resultlines) - url = "http://www.heise.de/\n" + url = u"http://www.heise.de/\n" nurl = linkcheck.url.url_norm(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % nurl, "real url %s" % nurl, - "warning Base URL is not properly normed. Normed url is %r." % nurl, + "warning Base URL is not properly normed. Normed url is %s." % nurl, "error", ] self.direct(url, resultlines) @@ -84,30 +84,30 @@ class TestError (linkcheck.ftests.StandardTest): def test_invalid (self): """invalid syntax test""" # invalid scheme chars - url = "äöü?:" + url = u"äöü?:" nurl = linkcheck.url.url_norm(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key None", "real url %s" % nurl, "error", ] self.direct(url, resultlines) # missing scheme alltogether - url = "?äöü?" + url = u"?äöü?" nurl = linkcheck.url.url_norm(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key None", "real url %s" % nurl, "error", ] self.direct(url, resultlines) # really fucked up - url = "@³²¼][½ ³@] ¬½" + url = u"@³²¼][½ ³@] ¬½" nurl = linkcheck.url.url_norm(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key None", "real url %s" % nurl, "error", diff --git a/linkcheck/ftests/test_file.py b/linkcheck/ftests/test_file.py index 20099e2a..90233cc7 100644 --- a/linkcheck/ftests/test_file.py +++ b/linkcheck/ftests/test_file.py @@ -51,38 +51,38 @@ class TestFile (linkcheck.ftests.StandardTest): 'datadir': 'linkcheck/ftests/data', } # good file - url = "file://%(curdir)s/%(datadir)s/file.txt" % attrs + url = u"file://%(curdir)s/%(datadir)s/file.txt" % attrs resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % url, "real url %s" % url, "valid", ] self.direct(url, resultlines) # bad file - url = "file:/%(curdir)s/%(datadir)s/file.txt" % attrs + url = u"file:/%(curdir)s/%(datadir)s/file.txt" % attrs resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % url, "real url %s" % url, "error", ] self.direct(url, resultlines) # good file (missing double slash) - url = "file:%(curdir)s/%(datadir)s/file.txt" % attrs + url = u"file:%(curdir)s/%(datadir)s/file.txt" % attrs nurl = linkcheck.url.url_norm(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key file://%(curdir)s/%(datadir)s/file.txt" % attrs, "real url file://%(curdir)s/%(datadir)s/file.txt" % attrs, - "warning Base URL is not properly normed. Normed url is %r." % nurl, + "warning Base URL is not properly normed. Normed url is %s." % nurl, "valid", ] self.direct(url, resultlines) # good dir - url = "file://%(curdir)s/%(datadir)s/" % attrs + url = u"file://%(curdir)s/%(datadir)s/" % attrs resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % url, "real url %s" % url, "valid", diff --git a/linkcheck/ftests/test_ftp.py b/linkcheck/ftests/test_ftp.py index 63da03bc..1c1edca7 100644 --- a/linkcheck/ftests/test_ftp.py +++ b/linkcheck/ftests/test_ftp.py @@ -29,9 +29,9 @@ class TestFtp (linkcheck.ftests.StandardTest): def test_ftp (self): """test ftp link""" # ftp two slashes - url = "ftp://ftp.debian.org/" + url = u"ftp://ftp.debian.org/" resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % url, "real url %s" % url, "valid", @@ -41,32 +41,32 @@ class TestFtp (linkcheck.ftests.StandardTest): def test_ftp_slashes (self): """test ftp links with missing slashes""" # ftp one slash - url = "ftp:/ftp.debian.org/" + url = u"ftp:/ftp.debian.org/" nurl = linkcheck.url.url_norm(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % nurl, "real url %s" % nurl, - "warning Base URL is not properly normed. Normed url is %r." % nurl, + "warning Base URL is not properly normed. Normed url is %s." % nurl, "error", ] self.direct(url, resultlines) # missing path - url = "ftp://ftp.debian.org" + url = u"ftp://ftp.debian.org" nurl = linkcheck.url.url_norm(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % nurl, "real url %s" % nurl, - "warning Base URL is not properly normed. Normed url is %r." % nurl, + "warning Base URL is not properly normed. Normed url is %s." % nurl, "valid", ] self.direct(url, resultlines) # missing trailing dir slash - url = "ftp://ftp.debian.org/debian" + url = u"ftp://ftp.debian.org/debian" nurl = linkcheck.url.url_norm(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % nurl, "real url %s/" % nurl, "warning Missing trailing directory slash in ftp url", @@ -77,31 +77,31 @@ class TestFtp (linkcheck.ftests.StandardTest): def test_ftp_many_slashes (self): """test ftp links with too many slashes""" # ftp two dir slashes - url = "ftp://ftp.debian.org//debian/" + url = u"ftp://ftp.debian.org//debian/" nurl = linkcheck.url.url_norm(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % nurl, "real url %s" % nurl, - "warning Base URL is not properly normed. Normed url is %r." % nurl, + "warning Base URL is not properly normed. Normed url is %s." % nurl, "valid", ] self.direct(url, resultlines) # ftp many dir slashes - url = "ftp://ftp.debian.org////////debian/" + url = u"ftp://ftp.debian.org////////debian/" nurl = linkcheck.url.url_norm(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % nurl, "real url %s" % nurl, - "warning Base URL is not properly normed. Normed url is %r." % nurl, + "warning Base URL is not properly normed. Normed url is %s." % nurl, "valid", ] self.direct(url, resultlines) # ftp three slashes - url = "ftp:///ftp.debian.org/" + url = u"ftp:///ftp.debian.org/" resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % url, "real url %s" % url, "error", diff --git a/linkcheck/ftests/test_https.py b/linkcheck/ftests/test_https.py index 3cf24f83..5b671b20 100644 --- a/linkcheck/ftests/test_https.py +++ b/linkcheck/ftests/test_https.py @@ -29,7 +29,7 @@ class TestHttps (linkcheck.ftests.StandardTest): """test some https links""" url = "https://sourceforge.net/" resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % url, "real url %s" % url, "valid", diff --git a/linkcheck/ftests/test_mail.py b/linkcheck/ftests/test_mail.py index d9e6602f..c556b3a1 100644 --- a/linkcheck/ftests/test_mail.py +++ b/linkcheck/ftests/test_mail.py @@ -30,7 +30,7 @@ class TestMail (linkcheck.ftests.StandardTest): url = self.quote("mailto:Dude , "\ "Killer ?subject=bla") resultlines = [ - "url %r" % url, + "url %s" % url, "cache key mailto:calvin@users.sf.net,calvin@users.sourceforge.net", "real url %s" % url, "info Verified address: is deliverable", @@ -40,7 +40,7 @@ class TestMail (linkcheck.ftests.StandardTest): url = self.quote("mailto:Bastian Kleineidam ?"\ "bcc=calvin%40users.sourceforge.net") resultlines = [ - "url %r" % url, + "url %s" % url, "cache key mailto:calvin@users.sf.net,calvin@users.sourceforge.net", "real url %s" % url, "info Verified address: is deliverable", @@ -49,7 +49,7 @@ class TestMail (linkcheck.ftests.StandardTest): self.direct(url, resultlines) url = self.quote("mailto:Bastian Kleineidam ") resultlines = [ - "url %r" % url, + "url %s" % url, "cache key mailto:calvin@users.sf.net", "real url %s" % url, "info Verified address: is deliverable", @@ -58,7 +58,7 @@ class TestMail (linkcheck.ftests.StandardTest): self.direct(url, resultlines) url = self.quote("mailto:o'hara@users.sf.net") resultlines = [ - "url %r" % url, + "url %s" % url, "cache key mailto:o'hara@users.sf.net", "real url %s" % url, "info Verified address: is deliverable", @@ -68,7 +68,7 @@ class TestMail (linkcheck.ftests.StandardTest): url = self.quote("mailto:?to=calvin@users.sf.net&subject=blubb&"\ "cc=calvin_cc@users.sf.net&CC=calvin_CC@users.sf.net") resultlines = [ - "url %r" % url, + "url %s" % url, "cache key mailto:calvin@users.sf.net,calvin_CC@users.sf.net,calvin_cc@users.sf.net", "real url %s" % url, "info Verified address: is deliverable", @@ -81,7 +81,7 @@ class TestMail (linkcheck.ftests.StandardTest): "Re:%20[fm%20#11093]%20(news-admins)%20Submission%20"\ "report%20-%20Pretty%20CoLoRs") resultlines = [ - "url %r" % url, + "url %s" % url, "cache key mailto:news-admins@freshmeat.net", "real url %s" % url, "valid", @@ -89,7 +89,7 @@ class TestMail (linkcheck.ftests.StandardTest): self.direct(url, resultlines) url = self.quote("mailto:foo@foo-bar.de?subject=test") resultlines = [ - "url %r" % url, + "url %s" % url, "cache key mailto:foo@foo-bar.de", "real url %s" % url, "valid", @@ -99,31 +99,31 @@ class TestMail (linkcheck.ftests.StandardTest): def test_warn_mail (self): """test some mailto addrs with warnings""" # contains non-quoted characters - url = "mailto:calvin@users.sf.net?subject=äöü" + url = u"mailto:calvin@users.sf.net?subject=äöü" qurl = self.quote(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key mailto:calvin@users.sf.net", "real url %s" % qurl, "info Verified address: is deliverable", - "warning Base URL is not properly normed. Normed url is %r." % qurl, + "warning Base URL is not properly normed. Normed url is %s." % qurl, "valid", ] self.direct(url, resultlines) - url = "mailto:calvin@users.sf.net?subject=Halli hallo" + url = u"mailto:calvin@users.sf.net?subject=Halli hallo" qurl = self.quote(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key mailto:calvin@users.sf.net", "real url %s" % qurl, "info Verified address: is deliverable", - "warning Base URL is not properly normed. Normed url is %r." % qurl, + "warning Base URL is not properly normed. Normed url is %s." % qurl, "valid", ] self.direct(url, resultlines) url = self.quote("mailto:") resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % url, "real url %s" % url, "warning No addresses found", @@ -137,7 +137,7 @@ class TestMail (linkcheck.ftests.StandardTest): url = self.quote("mailto:Bastian Kleineidam "\ "") resultlines = [ - "url %r" % url, + "url %s" % url, "cache key None", "real url %s" % url, "error", diff --git a/linkcheck/ftests/test_news.py b/linkcheck/ftests/test_news.py index 90cd6c40..59a028f7 100644 --- a/linkcheck/ftests/test_news.py +++ b/linkcheck/ftests/test_news.py @@ -34,9 +34,9 @@ class TestNews (linkcheck.ftests.StandardTest): def test_news (self): """test news: link""" # news testing - url = "news:comp.os.linux.misc" + url = u"news:comp.os.linux.misc" resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % url, "real url %s" % url, "warning No NNTP server specified, skipping this URL", @@ -44,9 +44,9 @@ class TestNews (linkcheck.ftests.StandardTest): ] self.newstest(url, resultlines) # no group - url = "news:" + url = u"news:" resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % url, "real url %s" % url, "warning No NNTP server specified, skipping this URL", @@ -56,13 +56,13 @@ class TestNews (linkcheck.ftests.StandardTest): def test_snews (self): """test snews: link""" - url = "snews:de.comp.os.unix.linux.misc" + url = u"snews:de.comp.os.unix.linux.misc" nurl = linkcheck.url.url_norm(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % nurl, "real url %s" % nurl, - "warning Base URL is not properly normed. Normed url is %r." % nurl, + "warning Base URL is not properly normed. Normed url is %s." % nurl, "warning No NNTP server specified, skipping this URL", "valid", ] @@ -70,13 +70,13 @@ class TestNews (linkcheck.ftests.StandardTest): def test_illegal (self): # illegal syntax - url = "news:§$%&/´`(§%" + url = u"news:§$%&/´`(§%" qurl = self.quote(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % qurl, "real url %s" % qurl, - "warning Base URL is not properly normed. Normed url is %r." % qurl, + "warning Base URL is not properly normed. Normed url is %s." % qurl, "warning No NNTP server specified, skipping this URL", "valid", ] @@ -84,9 +84,9 @@ class TestNews (linkcheck.ftests.StandardTest): def test_nntp (self): """nttp scheme with host""" - url = "nntp://news.yaako.com/comp.lang.python" + url = u"nntp://news.yaako.com/comp.lang.python" resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % url, "real url %s" % url, "valid", @@ -95,17 +95,17 @@ class TestNews (linkcheck.ftests.StandardTest): def test_article_span (self): """article span""" - url = "nntp://news.yaako.com/comp.lang.python/1-5" + url = u"nntp://news.yaako.com/comp.lang.python/1-5" resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % url, "real url %s" % url, "valid", ] self.newstest(url, resultlines) - url = "news:comp.lang.python/1-5" + url = u"news:comp.lang.python/1-5" resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % url, "real url %s" % url, "warning No NNTP server specified, skipping this URL", @@ -115,9 +115,9 @@ class TestNews (linkcheck.ftests.StandardTest): def test_host_no_group (self): """host but no group""" - url = "nntp://news.yaako.com/" + url = u"nntp://news.yaako.com/" resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % url, "real url %s" % url, "warning No newsgroup specified in NNTP URL", diff --git a/linkcheck/ftests/test_telnet.py b/linkcheck/ftests/test_telnet.py index 49efb517..2d39a6e0 100644 --- a/linkcheck/ftests/test_telnet.py +++ b/linkcheck/ftests/test_telnet.py @@ -25,35 +25,35 @@ class TestTelnet (linkcheck.ftests.StandardTest): """test telnet: link checking""" def test_telnet (self): - url = "telnet:" + url = u"telnet:" nurl = linkcheck.url.url_norm(url) resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % nurl, "real url %s" % nurl, - "warning Base URL is not properly normed. Normed url is %r." % nurl, + "warning Base URL is not properly normed. Normed url is %s." % nurl, "error", ] self.direct(url, resultlines) - url = "telnet://www.imarealdoofus.com" + url = u"telnet://www.imarealdoofus.com" resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % url, "real url %s" % url, "error", ] self.direct(url, resultlines) - url = "telnet://user@www.imarealdoofus.com" + url = u"telnet://user@www.imarealdoofus.com" resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % url, "real url %s" % url, "error", ] self.direct(url, resultlines) - url = "telnet://user:pass@www.imarealdoofus.com" + url = u"telnet://user:pass@www.imarealdoofus.com" resultlines = [ - "url %r" % url, + "url %s" % url, "cache key %s" % url, "real url %s" % url, "error",