Move test files to separate module

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3763 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2008-05-20 17:01:16 +00:00
parent b0118ebbaa
commit 9352dbf5e4
87 changed files with 42 additions and 562 deletions

View file

@ -19,6 +19,9 @@ include debian/NEWS
include debian/README.Debian
include debian/watch
include test.py tests/*.py
include tests/checker/*.py
include tests/configuration/*.py
include tests/dns/*.py
include scripts/*.py scripts/*.sh scripts/*.bat
include cgi-bin/lconline/*.html cgi-bin/lconline/*.de cgi-bin/lconline/*.en
include cgi-bin/lconline/*.js cgi-bin/lconline/*.css
@ -36,12 +39,8 @@ include doc/en/*.html doc/en/*.css doc/en/*.1 doc/en/*.5 doc/en/Makefile
include doc/de/*.1 doc/de/*.5
include doc/Makefile doc/rest2htmlnav
include doc/examples/*.sh
recursive-include linkcheck/checker/tests/data *.txt *.html *.result *.asc *.css *.ico
recursive-include linkcheck/configuration/tests/data *.ini
include linkcheck/tests/*.py
include linkcheck/checker/tests/*.py
include linkcheck/configuration/tests/*.py
include linkcheck/dns/tests/*.py
include linkcheck/dns/tests/example*
recursive-include tests/checker/data *.txt *.html *.result *.asc *.css *.ico
recursive-include tests/configuration/data *.ini
include tests/dns/example*
include linkcheck/dns/ChangeLog
include hase.bmp

View file

@ -1,8 +0,0 @@
<a href="#myid">Bla</a>
<ul>
<li id="myid">
<a href="#myid">Bla2</a>
<a href="#broken">Bla3</a>
<a href="anchor.html">Bla6</a>
<a href="#broken2">Bla4</a>
</ul>

View file

@ -1,36 +0,0 @@
url file://%(curdir)s/%(datadir)s/anchor.html
cache key file://%(curdir)s/%(datadir)s/anchor.html
real url file://%(curdir)s/%(datadir)s/anchor.html
valid
url anchor.html (cached)
cache key file://%(curdir)s/%(datadir)s/anchor.html
real url file://%(curdir)s/%(datadir)s/anchor.html
name Bla6
valid
url #myid
cache key file://%(curdir)s/%(datadir)s/anchor.html#myid
real url file://%(curdir)s/%(datadir)s/anchor.html
name Bla
valid
url #myid (cached)
cache key file://%(curdir)s/%(datadir)s/anchor.html#myid
real url file://%(curdir)s/%(datadir)s/anchor.html
name Bla2
valid
url #broken
cache key file://%(curdir)s/%(datadir)s/anchor.html#broken
real url file://%(curdir)s/%(datadir)s/anchor.html
name Bla3
warning Anchor #broken not found.
valid
url #broken2
cache key file://%(curdir)s/%(datadir)s/anchor.html#broken2
real url file://%(curdir)s/%(datadir)s/anchor.html
name Bla4
warning Anchor #broken2 not found.
valid

View file

@ -1,8 +0,0 @@
<!-- base without href -->
<base target="_top">
<!-- meta url -->
<META HTTP-equiv="refresh" content="0; url=base2.html">
<!-- spaces between key and value -->
<a href
=
"base2.html">

View file

@ -1,14 +0,0 @@
url file://%(curdir)s/%(datadir)s/base1.html
cache key file://%(curdir)s/%(datadir)s/base1.html
real url file://%(curdir)s/%(datadir)s/base1.html
valid
url base2.html
cache key file://%(curdir)s/%(datadir)s/base2.html
real url file://%(curdir)s/%(datadir)s/base2.html
valid
url base2.html (cached)
cache key file://%(curdir)s/%(datadir)s/base2.html
real url file://%(curdir)s/%(datadir)s/base2.html
valid

View file

@ -1,3 +0,0 @@
<!-- base with href -->
<base href="base/">
<a href="test.txt">

View file

@ -1,10 +0,0 @@
url file://%(curdir)s/%(datadir)s/base2.html
cache key file://%(curdir)s/%(datadir)s/base2.html
real url file://%(curdir)s/%(datadir)s/base2.html
valid
url test.txt
cache key file://%(curdir)s/%(datadir)s/base/test.txt
real url file://%(curdir)s/%(datadir)s/base/test.txt
baseurl file://%(curdir)s/%(datadir)s/base/
valid

View file

@ -1,2 +0,0 @@
<!-- codebase test -->
<applet codebase="base/" archive="test.txt">

View file

@ -1,10 +0,0 @@
url file://%(curdir)s/%(datadir)s/base3.html
cache key file://%(curdir)s/%(datadir)s/base3.html
real url file://%(curdir)s/%(datadir)s/base3.html
valid
url test.txt
cache key file://%(curdir)s/%(datadir)s/base/test.txt
real url file://%(curdir)s/%(datadir)s/base/test.txt
baseurl file://%(curdir)s/%(datadir)s/base/
valid

View file

@ -1,12 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en">
<head>
<base href="base/" />
</head>
<body>
<a href="test.txt">Blubb</a>
</body>
</html>

View file

@ -1,11 +0,0 @@
url file://%(curdir)s/%(datadir)s/base4.html
cache key file://%(curdir)s/%(datadir)s/base4.html
real url file://%(curdir)s/%(datadir)s/base4.html
valid
url test.txt
cache key file://%(curdir)s/%(datadir)s/base/test.txt
real url file://%(curdir)s/%(datadir)s/base/test.txt
name Blubb
baseurl file://%(curdir)s/%(datadir)s/base/
valid

View file

@ -1,8 +0,0 @@
Host: example.com
Path: /hello
Set-cookie: ID="smee"
Set-cookie: spam="egg"
Scheme: https
Host: example.org
Set-cookie: baggage="elitist"; comment="hologram"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 B

View file

@ -1 +0,0 @@
file:///etc/group

View file

@ -1,4 +0,0 @@
url file://%(curdir)s/%(datadir)s/file.asc
cache key file://%(curdir)s/%(datadir)s/file.asc
real url file://%(curdir)s/%(datadir)s/file.asc
valid

View file

@ -1,5 +0,0 @@
@font-face {
src:url(file.html)
}
background-image:url(file.html)
/*background-image:url(broken.html)*/

View file

@ -1,14 +0,0 @@
url file://%(curdir)s/%(datadir)s/file.css
cache key file://%(curdir)s/%(datadir)s/file.css
real url file://%(curdir)s/%(datadir)s/file.css
valid
url file.html
cache key file://%(curdir)s/%(datadir)s/file.html
real url file://%(curdir)s/%(datadir)s/file.html
valid
url file.html (cached)
cache key file://%(curdir)s/%(datadir)s/file.html
real url file://%(curdir)s/%(datadir)s/file.html
valid

View file

@ -1,8 +0,0 @@
<a href="file.html">relative url</a>
<a href="file.html#isnix">bad anchor</a>
<a href="file.html#iswas">good anchor</a>
<a href="#isnix">bad anchor</a>
<a href="#iswas">good anchor</a>
<a href="javascript:loadthis()">javascript url</a>
<a name="iswas">anchor</a>

View file

@ -1,43 +0,0 @@
url file://%(curdir)s/%(datadir)s/file.html
cache key file://%(curdir)s/%(datadir)s/file.html
real url file://%(curdir)s/%(datadir)s/file.html
valid
url file.html (cached)
cache key file://%(curdir)s/%(datadir)s/file.html
real url file://%(curdir)s/%(datadir)s/file.html
name relative url
valid
url file.html#isnix
cache key file://%(curdir)s/%(datadir)s/file.html#isnix
real url file://%(curdir)s/%(datadir)s/file.html
name bad anchor
warning Anchor #isnix not found.
valid
url file.html#iswas
cache key file://%(curdir)s/%(datadir)s/file.html#iswas
real url file://%(curdir)s/%(datadir)s/file.html
name good anchor
valid
url #isnix (cached)
cache key file://%(curdir)s/%(datadir)s/file.html#isnix
real url file://%(curdir)s/%(datadir)s/file.html
name bad anchor
warning Anchor #isnix not found.
valid
url #iswas (cached)
cache key file://%(curdir)s/%(datadir)s/file.html#iswas
real url file://%(curdir)s/%(datadir)s/file.html
name good anchor
valid
url javascript:loadthis()
cache key javascript:loadthis()
real url javascript:loadthis()
name javascript url
warning Javascript URL ignored.
valid

View file

@ -1 +0,0 @@
file:///etc/group

View file

@ -1,4 +0,0 @@
url file://%(curdir)s/%(datadir)s/file.txt
cache key file://%(curdir)s/%(datadir)s/file.txt
real url file://%(curdir)s/%(datadir)s/file.txt
valid

View file

@ -1,5 +0,0 @@
<!-- frame src urls -->
<frameset border="0" frameborder="0" framespacing="0">
<frame name="top" src="frames.html" frameborder="0">
<frame name="bottom" src="frames.html" frameborder="0">
</frameset>

View file

@ -1,14 +0,0 @@
url file://%(curdir)s/%(datadir)s/frames.html
cache key file://%(curdir)s/%(datadir)s/frames.html
real url file://%(curdir)s/%(datadir)s/frames.html
valid
url frames.html (cached)
cache key file://%(curdir)s/%(datadir)s/frames.html
real url file://%(curdir)s/%(datadir)s/frames.html
valid
url frames.html (cached)
cache key file://%(curdir)s/%(datadir)s/frames.html
real url file://%(curdir)s/%(datadir)s/frames.html
valid

View file

@ -1,39 +0,0 @@
Just some HTTP links
<a b=c "boo" href="http://www.garantiertnixgutt.bla/">bad url</a>
<a href="http://localhost:8001/">ok</a>
<a href="http:/localhost:8001/">one slash</a>
<a href="http:localhost:8001/">no slash</a>
<a href="http://">no url</a>
<a href="http:/">no url, one slash</a>
<a href="http:">no url, no slash</a>
<a href="http://localhost:8001/stalter&sohn">unquoted ampersand</a>
<a href=http://slashdot.org/>unquoted</a>
<a href="HtTP://LoCAlHOst:8001/">should be cached</a>
<a href="HTTP://LOCALHOST:8001/">should be cached</a>
<!-- check cache key with query -->
<a href="http://localhost:8001/?d=directory&amp;p=page">should not be cached</a>
<a href="http://localhost:8001/?d=directory&amp;p=page1">should not be cached</a>
<!-- entities -->
<a href="http://localhost:8001/?quoted=&uuml;">html entities</a>
<!-- quoting test...
<a href=""></a>
-->
<!-- empty form URL -->
<form action="" method="GET">
</form>
<!-- multiple links in one tag -->
<applet archive="http.html" src="http.html">
<!-- css urls -->
<img style="@font-face {src:url(http.html)};background-image:url(http.html)"
title="CSS urls">
<!-- object with codebase -->
<object classid="clsid:12345" codebase="http://example.org/foo/ #a=1,2,3">
<!-- <a href=http://nocheckin> no check because of comment -->
<a href=http://localhost:8001/">no beginning quote</a>
<a href="http://localhost:8001/>no ending quote</a>
<!-- check the parser at end of file -->
<a href="g

View file

@ -1,136 +0,0 @@
url http://localhost:8001/%(datadir)s/http.html
cache key http://localhost:8001/%(datadir)s/http.html
real url http://localhost:8001/%(datadir)s/http.html
valid
url http.html (cached)
cache key http://localhost:8001/%(datadir)s/http.html
real url http://localhost:8001/%(datadir)s/http.html
name CSS urls
valid
url http.html (cached)
cache key http://localhost:8001/%(datadir)s/http.html
real url http://localhost:8001/%(datadir)s/http.html
name CSS urls
valid
url http.html (cached)
cache key http://localhost:8001/%(datadir)s/http.html
real url http://localhost:8001/%(datadir)s/http.html
valid
url http.html (cached)
cache key http://localhost:8001/%(datadir)s/http.html
real url http://localhost:8001/%(datadir)s/http.html
valid
url (cached)
cache key http://localhost:8001/%(datadir)s/http.html
real url http://localhost:8001/%(datadir)s/http.html
valid
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/
cache key http://localhost:8001/
real url http://localhost:8001/
name ok
valid
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)
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://
cache key http://
real url http://
name no url
error
url http:/
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)
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
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/
cache key http://slashdot.org/
real url http://slashdot.org/
name unquoted
valid
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)
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
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
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=ü
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 clsid:12345
cache key clsid:12345
real url clsid:12345
baseurl http://example.org/foo/%%20#a%%3D1%%2C2%%2C3
warning Clsid URL ignored.
valid
url http://localhost:8001/ (cached)
cache key http://localhost:8001/
real url http://localhost:8001/
name no beginning quote
valid

View file

@ -1,14 +0,0 @@
<!-- meta -->
<meta http-equiv="refresh" content="5; url=http://localhost:8001/">
<meta rel="SHORTCUT ICON" href="favicon.ico">
<meta rel="ICON" href="favicon.ico">
<!-- unparsable domain name -->
<a href="http://imadööfus.org%0D%3Cfont%20face=%22Verdana,%20Arial,%20Helvetica,%20sans-serif%22%20size=%222%22%3E%3Chttp://www.imadoofus.org%3E%20%0D%20%20%20%20%20%20%20%20%20%20%20%20%20%20">blubb</a>
<!-- empty tag -->
<tr background>
<!-- shockwave flash -->
<a href="test.swf">SWF</a>
<script for="someid"></script>

View file

@ -1,37 +0,0 @@
url file://%(curdir)s/%(datadir)s/misc.html
cache key file://%(curdir)s/%(datadir)s/misc.html
real url file://%(curdir)s/%(datadir)s/misc.html
valid
url http://localhost:8001/
cache key http://localhost:8001/
real url http://localhost:8001/
error
url favicon.ico
cache key file://%(curdir)s/%(datadir)s/favicon.ico
real url file://%(curdir)s/%(datadir)s/favicon.ico
valid
url favicon.ico (cached)
cache key file://%(curdir)s/%(datadir)s/favicon.ico
real url file://%(curdir)s/%(datadir)s/favicon.ico
valid
url http://imadööfus.org%%0D%%3Cfont%%20face=%%22Verdana,%%20Arial,%%20Helvetica,%%20sans-serif%%22%%20size=%%222%%22%%3E%%3Chttp://www.imadoofus.org%%3E%%20%%0D%%20%%20%%20%%20%%20%%20%%20%%20%%20%%20%%20%%20%%20%%20
cache key None
real url None
name blubb
error
url
cache key None
real url None
error
url test.swf
cache key file://%(curdir)s/%(datadir)s/test.swf
real url file://%(curdir)s/%(datadir)s/test.swf
name SWF
valid

View file

@ -1 +0,0 @@
<a href="newurl.html">Recursive Redirect</a>

View file

@ -1,2 +0,0 @@
<meta name="robots" content="nofollow">
<a href="do_not_check.html">bla</a>

View file

@ -1,4 +0,0 @@
url file://%(curdir)s/%(datadir)s/norobots.html
cache key file://%(curdir)s/%(datadir)s/norobots.html
real url file://%(curdir)s/%(datadir)s/norobots.html
valid

View file

@ -1 +0,0 @@
qü'4309 uq0'34 tuqüt9 qeürgjsadöfg jias#http://www.example.org/°°

View file

@ -1,9 +0,0 @@
# LinkChecker url list
# empty lines and
# comments are ignored
file.html
file.html#isnix
file.html#iswas
javascript:loadthis()

View file

@ -1,26 +0,0 @@
url file://%(curdir)s/%(datadir)s/urllist.txt
cache key file://%(curdir)s/%(datadir)s/urllist.txt
real url file://%(curdir)s/%(datadir)s/urllist.txt
valid
url file.html
cache key file://%(curdir)s/%(datadir)s/file.html
real url file://%(curdir)s/%(datadir)s/file.html
valid
url file.html#isnix
cache key file://%(curdir)s/%(datadir)s/file.html#isnix
real url file://%(curdir)s/%(datadir)s/file.html
warning Anchor #isnix not found.
valid
url file.html#iswas
cache key file://%(curdir)s/%(datadir)s/file.html#iswas
real url file://%(curdir)s/%(datadir)s/file.html
valid
url javascript:loadthis()
cache key javascript:loadthis()
real url javascript:loadthis()
warning Javascript URL ignored.
valid

View file

@ -1,19 +0,0 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2008 Bastian Kleineidam
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
"""
Test package.
"""

View file

@ -23,7 +23,6 @@ import re
import codecs
import difflib
import unittest
import linkcheck.checker
import linkcheck.configuration
import linkcheck.director
@ -101,7 +100,7 @@ def get_file (filename=None):
"""
Get file name located within 'data' directory.
"""
directory = os.path.join("linkcheck", "checker", "tests", "data")
directory = os.path.join("tests", "checker", "data")
if filename:
return unicode(os.path.join(directory, filename))
return unicode(directory)
@ -160,8 +159,8 @@ class LinkCheckTest (unittest.TestCase):
"""Return current and data directory as dictionary.
You can augment the dict with keyword attributes."""
d = {
'curdir': linkcheck.checker.tests.get_file_url(os.getcwd()),
'datadir': "linkcheck/checker/tests/data",
'curdir': get_file_url(os.getcwd()),
'datadir': "tests/checker/data",
}
d.update(kwargs)
return d

View file

@ -22,8 +22,7 @@ import SimpleHTTPServer
import BaseHTTPServer
import httplib
import time
import linkcheck.checker.tests
from . import LinkCheckTest
class StoppableHttpRequestHandler (SimpleHTTPServer.SimpleHTTPRequestHandler, object):
@ -88,7 +87,7 @@ class NoQueryHttpRequestHandler (StoppableHttpRequestHandler):
super(NoQueryHttpRequestHandler, self).do_HEAD()
class HttpServerTest (linkcheck.checker.tests.LinkCheckTest):
class HttpServerTest (LinkCheckTest):
"""
Start/stop an HTTP server that can be used for testing.
"""

View file

@ -19,11 +19,10 @@ Test html anchor parsing and checking.
"""
import unittest
import linkcheck.checker.tests
from . import LinkCheckTest
class TestAnchor (linkcheck.checker.tests.LinkCheckTest):
class TestAnchor (LinkCheckTest):
"""
Test anchor checking of HTML pages.
"""

View file

@ -19,10 +19,10 @@ Test html <base> tag parsing.
"""
import unittest
from . import LinkCheckTest
import linkcheck.checker.tests
class TestBase (linkcheck.checker.tests.LinkCheckTest):
class TestBase (LinkCheckTest):
"""
Test links of base*.html files.
"""

View file

@ -19,12 +19,10 @@ Test error checking.
"""
import unittest
import linkcheck.checker.tests
import linkcheck.url
from . import LinkCheckTest
class TestError (linkcheck.checker.tests.LinkCheckTest):
class TestError (LinkCheckTest):
"""
Test unrecognized or syntactically wrong links.
"""

View file

@ -20,10 +20,10 @@ Test file parsing.
import unittest
import os
from . import LinkCheckTest
import linkcheck.checker.tests
class TestFile (linkcheck.checker.tests.LinkCheckTest):
class TestFile (LinkCheckTest):
"""
Test file:// link checking (and file content parsing).
"""

View file

@ -19,10 +19,10 @@ Test html <frame> tag parsing.
"""
import unittest
from . import LinkCheckTest
import linkcheck.checker.tests
class TestFrames (linkcheck.checker.tests.LinkCheckTest):
class TestFrames (LinkCheckTest):
"""
Test link checking of HTML framesets.
"""

View file

@ -19,11 +19,10 @@ Test ftp checking.
"""
import unittest
import linkcheck.checker.tests
from . import LinkCheckTest
class TestFtp (linkcheck.checker.tests.LinkCheckTest):
class TestFtp (LinkCheckTest):
"""
Test ftp: link checking.
"""

View file

@ -33,7 +33,7 @@ class TestHttp (httptest.HttpServerTest):
def test_html (self):
try:
self.start_server(handler=CookieRedirectHttpRequestHandler)
url = u"http://localhost:%d/linkcheck/checker/tests/data/" \
url = u"http://localhost:%d/tests/checker/data/" \
u"http.html" % self.port
resultlines = self.get_resultlines("http.html")
self.direct(url, resultlines, recursionlevel=1)
@ -86,7 +86,7 @@ class TestHttp (httptest.HttpServerTest):
self.direct(url, resultlines, recursionlevel=0)
def redirect2_http_test (self):
url = u"http://localhost:%d/linkcheck/checker/tests/data/redirect.html" % \
url = u"http://localhost:%d/tests/checker/data/redirect.html" % \
self.port
nurl = url
rurl = url.replace("redirect", "newurl")
@ -132,7 +132,7 @@ class TestHttp (httptest.HttpServerTest):
"""
os.environ["http_proxy"] = "http://example.org:8877"
confargs = {"noproxyfor": [re.compile("localhost")]}
url = u"http://localhost:%d/linkcheck/checker/tests/data/http.html" % \
url = u"http://localhost:%d/tests/checker/data/http.html" % \
self.port
nurl = url
resultlines = [
@ -147,7 +147,7 @@ class TestHttp (httptest.HttpServerTest):
del os.environ["http_proxy"]
def swf_test (self):
url = u"http://localhost:%d/linkcheck/checker/tests/data/" \
url = u"http://localhost:%d/tests/checker/data/" \
u"test.swf" % self.port
resultlines = [
u"url %s" % url,

View file

@ -19,10 +19,10 @@ Test news checking.
"""
import unittest
from . import LinkCheckTest
import linkcheck.checker.tests
class TestHttps (linkcheck.checker.tests.LinkCheckTest):
class TestHttps (LinkCheckTest):
"""
Test https: link checking.
"""

View file

@ -19,10 +19,10 @@ Test mail checking.
"""
import unittest
from . import LinkCheckTest
import linkcheck.checker.tests
class TestMail (linkcheck.checker.tests.LinkCheckTest):
class TestMail (LinkCheckTest):
"""
Test mailto: link checking.
"""

View file

@ -19,10 +19,10 @@ Test miscellaneous html tag parsing.
"""
import unittest
from . import LinkCheckTest
import linkcheck.checker.tests
class TestMisc (linkcheck.checker.tests.LinkCheckTest):
class TestMisc (LinkCheckTest):
"""
Test link checking of HTML tags.
"""

View file

@ -19,12 +19,10 @@ Test news checking.
"""
import unittest
import linkcheck.checker.tests
import linkcheck.url
from . import LinkCheckTest
class TestNews (linkcheck.checker.tests.LinkCheckTest):
class TestNews (LinkCheckTest):
"""
Test nntp: and news: link checking.
"""

View file

@ -19,11 +19,10 @@ Test HTML robots.txt parsing.
"""
import unittest
import linkcheck.checker.tests
from . import LinkCheckTest
class TestRobotsTxt (linkcheck.checker.tests.LinkCheckTest):
class TestRobotsTxt (LinkCheckTest):
"""
Test robots.txt directive parsing in HTML files.
"""

View file

@ -19,11 +19,10 @@ Test telnet checking.
"""
import unittest
import linkcheck.checker.tests
from . import LinkCheckTest
class TestTelnet (linkcheck.checker.tests.LinkCheckTest):
class TestTelnet (LinkCheckTest):
"""
Test telnet: link checking.
"""

View file

@ -25,7 +25,7 @@ import linkcheck.configuration
def get_file (filename=None):
"""Get file name located within 'data' directory."""
directory = os.path.join("linkcheck", "configuration", "tests", "data")
directory = os.path.join("tests", "configuration", "data")
if filename:
return unicode(os.path.join(directory, filename))
return unicode(directory)

View file

@ -27,7 +27,7 @@ import linkcheck.dns.rdatatype
import linkcheck.dns.rrset
import linkcheck.dns.zone
_paths = ["linkcheck", "dns", "tests"]
_paths = ["tests", "dns"]
def fname (name, sep=None):
args = tuple(_paths + [name])

View file

@ -38,7 +38,7 @@ class TestUrlBuild (unittest.TestCase):
"""
def test_http_build (self):
parent_url = "http://localhost:8001/linkcheck/checker/tests/data/http.html"
parent_url = "http://localhost:8001/tests/checker/data/http.html"
base_url = "http://"
recursion_level = 0
aggregate = get_test_aggregate()