mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-02 11:54:43 +00:00
added more tests
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2805 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
518d8b3a57
commit
866999a883
2 changed files with 13 additions and 0 deletions
|
|
@ -89,6 +89,16 @@ class TestStrFormat (unittest.TestCase):
|
|||
self.assertEquals(linkcheck.strformat.strsize(1023), "1023 Bytes")
|
||||
self.assertEquals(linkcheck.strformat.strsize(1024), "1.00 kB")
|
||||
|
||||
def test_is_ascii (self):
|
||||
self.assert_(linkcheck.strformat.is_ascii("abcd./"))
|
||||
self.assert_(not linkcheck.strformat.is_ascii("ä"))
|
||||
self.assert_(not linkcheck.strformat.is_ascii(u"ä"))
|
||||
|
||||
def test_indent (self):
|
||||
s = "bla"
|
||||
self.assertEquals(linkcheck.strformat.indent(s, ""), s)
|
||||
self.assertEquals(linkcheck.strformat.indent(s, " "), " "+s)
|
||||
|
||||
|
||||
def test_suite ():
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -424,6 +424,9 @@ class TestUrl (unittest.TestCase):
|
|||
nurl = url
|
||||
self.assertEqual(url_norm(url), nurl)
|
||||
self.assert_(not linkcheck.url.url_needs_quoting(url))
|
||||
url = "http://hulla/a/b/!?c=d"
|
||||
nurl = url
|
||||
self.assertEqual(url_norm(url), nurl)
|
||||
|
||||
def test_idn_encoding (self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue