Remove spaces after names in class definitions

This commit is contained in:
Chris Mayo 2020-05-16 20:19:42 +01:00
parent 16fe12fb50
commit fc11d08968
85 changed files with 102 additions and 101 deletions

View file

@ -276,7 +276,7 @@ class Colorizer:
return getattr(self.fp, name)
class ColoredStreamHandler (logging.StreamHandler):
class ColoredStreamHandler(logging.StreamHandler):
"""Send colored log messages to streams (file-like objects)."""
def __init__ (self, strm=None):

View file

@ -22,7 +22,7 @@ import socket
from . import urlbase
class DnsUrl (urlbase.UrlBase):
class DnsUrl(urlbase.UrlBase):
"""
Url link with dns scheme.
"""

View file

@ -88,7 +88,7 @@ def is_absolute_path (path):
return path.startswith("/")
class FileUrl (urlbase.UrlBase):
class FileUrl(urlbase.UrlBase):
"""
Url link with file scheme.
"""

View file

@ -25,7 +25,7 @@ from . import proxysupport, httpurl, internpaturl, get_index_html
from .const import WARN_FTP_MISSING_SLASH
class FtpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport):
class FtpUrl(internpaturl.InternPatternUrl, proxysupport.ProxySupport):
"""
Url link with ftp scheme.
"""

View file

@ -45,7 +45,8 @@ unicode_safe = strformat.unicode_safe
# match for robots meta element content attribute
nofollow_re = re.compile(r"\bnofollow\b", re.IGNORECASE)
class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport):
class HttpUrl(internpaturl.InternPatternUrl, proxysupport.ProxySupport):
"""
Url link with http scheme.
"""

View file

@ -19,7 +19,7 @@ Handle ignored URLs.
from . import unknownurl
class IgnoreUrl (unknownurl.UnknownUrl):
class IgnoreUrl(unknownurl.UnknownUrl):
"""Always ignored URL."""
def is_ignored (self):

View file

@ -45,7 +45,7 @@ def get_intern_pattern (url):
return "^%s://%s%s" % tuple(args)
class InternPatternUrl (urlbase.UrlBase):
class InternPatternUrl(urlbase.UrlBase):
"""Class supporting an intern URL pattern."""
def get_intern_pattern (self, url=None):

View file

@ -62,7 +62,7 @@ def is_missing_quote (addr):
EMAIL_CGI_ADDRESS = ("to", "cc", "bcc")
EMAIL_CGI_SUBJECT = "subject"
class MailtoUrl (urlbase.UrlBase):
class MailtoUrl(urlbase.UrlBase):
"""
Url link with mailto scheme.
"""

View file

@ -28,7 +28,7 @@ from .const import WARN_NNTP_NO_SERVER, WARN_NNTP_NO_NEWSGROUP
random.seed()
class NntpUrl (urlbase.UrlBase):
class NntpUrl(urlbase.UrlBase):
"""
Url link with NNTP scheme.
"""

View file

@ -27,7 +27,7 @@ def encode(s, encoding="iso-8859-1", errors="ignore"):
return s.encode(encoding, errors)
class TelnetUrl (urlbase.UrlBase):
class TelnetUrl(urlbase.UrlBase):
"""
Url link with telnet scheme.
"""

View file

@ -21,7 +21,7 @@ import re
from . import urlbase
class UnknownUrl (urlbase.UrlBase):
class UnknownUrl(urlbase.UrlBase):
"""Handle unknown or just plain broken URLs."""
def build_url (self):

View file

@ -144,7 +144,7 @@ def get_certifi_file():
# dynamic options
class Configuration (dict):
class Configuration(dict):
"""
Storage for configuration options. Options can both be given from
the command line as well as from configuration files.

View file

@ -30,7 +30,7 @@ def read_multiline (value):
yield line
class LCConfigParser (RawConfigParser):
class LCConfigParser(RawConfigParser):
"""
Parse a LinkChecker configuration file.
"""

View file

@ -17,7 +17,7 @@
Special container classes.
"""
class LFUCache (dict):
class LFUCache(dict):
"""Limited cache which purges least frequently used items."""
def __init__ (self, size=1000):

View file

@ -19,7 +19,7 @@ from . import task
from .. import log, LOG_CHECK, strformat
class Interrupt (task.CheckedTask):
class Interrupt(task.CheckedTask):
"""Thread that raises KeyboardInterrupt after a specified duration.
This gives us a portable SIGALRM implementation.
The duration is checked every 5 seconds.

View file

@ -18,7 +18,7 @@ import time
from . import task
class Status (task.LoggedCheckedTask):
class Status(task.LoggedCheckedTask):
"""Thread that gathers and logs the status periodically."""
def __init__ (self, aggregator, wait_seconds):

View file

@ -20,7 +20,7 @@ from .. import threader
from . import console
class CheckedTask (threader.StoppableThread):
class CheckedTask(threader.StoppableThread):
"""Stoppable URL check task, handling error conditions while running."""
def run (self):
@ -43,7 +43,7 @@ class CheckedTask (threader.StoppableThread):
pass
class LoggedCheckedTask (CheckedTask):
class LoggedCheckedTask(CheckedTask):
"""URL check task with a logger instance and internal error handling."""
def __init__ (self, logger):

View file

@ -37,7 +37,7 @@ def install_builtin (translator, do_unicode):
# also install ngettext
builtins.__dict__['_n'] = translator.ngettext
class Translator (gettext.GNUTranslations):
class Translator(gettext.GNUTranslations):
"""A translation class always installing its gettext methods into the
default namespace."""
@ -46,7 +46,7 @@ class Translator (gettext.GNUTranslations):
install_builtin(self, do_unicode)
class NullTranslator (gettext.NullTranslations):
class NullTranslator(gettext.NullTranslations):
"""A dummy translation class always installing its gettext methods into
the default namespace."""

View file

@ -129,7 +129,7 @@ class LogStatistics:
self.internal_errors += 1
class _Logger (abc.ABC):
class _Logger(abc.ABC):
"""
Base class for logging of checked urls. It defines the public API
(see below) and offers basic functionality for all loggers.

View file

@ -23,7 +23,7 @@ from linkcheck.configuration import get_user_data
from . import _Logger
class BlacklistLogger (_Logger):
class BlacklistLogger(_Logger):
"""
Updates a blacklist of wrong links. If a link on the blacklist
is working (again), it is removed from the list. So after n days

View file

@ -30,7 +30,7 @@ Columns = (
)
class CSVLogger (_Logger):
class CSVLogger(_Logger):
"""
CSV output, consisting of one line per entry. Entries are
separated by a separator (a semicolon per default).

View file

@ -21,7 +21,7 @@ from .. import strformat
from builtins import str as str_text
class CustomXMLLogger (xmllog._XMLLogger):
class CustomXMLLogger(xmllog._XMLLogger):
"""
XML custom output for easy post-processing.
"""

View file

@ -20,7 +20,7 @@ http://www.graphviz.org/doc/info/lang.html
from .graph import _GraphLogger
class DOTLogger (_GraphLogger):
class DOTLogger(_GraphLogger):
"""
Generates .dot sitemap graphs. Use graphviz to see the sitemap graph.
"""

View file

@ -19,7 +19,7 @@ A gml logger.
from .graph import _GraphLogger
class GMLLogger (_GraphLogger):
class GMLLogger(_GraphLogger):
"""GML means Graph Modeling Language. Use a GML tool to see
the sitemap graph."""

View file

@ -21,7 +21,7 @@ from ..decorators import notimplemented
import re
class _GraphLogger (_Logger):
class _GraphLogger(_Logger):
"""Provide base method to get node data."""
def __init__ (self, **kwargs):

View file

@ -21,7 +21,7 @@ from .xmllog import _XMLLogger
from .graph import _GraphLogger
class GraphXMLLogger (_XMLLogger, _GraphLogger):
class GraphXMLLogger(_XMLLogger, _GraphLogger):
"""XML output mirroring the GML structure. Easy to parse with any XML
tool."""

View file

@ -59,7 +59,7 @@ HTML_HEADER = """<!DOCTYPE HTML>
"""
class HtmlLogger (_Logger):
class HtmlLogger(_Logger):
"""Logger with HTML output."""
LoggerName = 'html'

View file

@ -19,7 +19,7 @@ A dummy logger.
from . import _Logger
class NoneLogger (_Logger):
class NoneLogger(_Logger):
"""
Dummy logger printing nothing.
"""

View file

@ -32,7 +32,7 @@ ChangeFreqs = (
HTTP_SCHEMES = ('http:', 'https:')
HTML_TYPES = ('text/html', "application/xhtml+xml")
class SitemapXmlLogger (xmllog._XMLLogger):
class SitemapXmlLogger(xmllog._XMLLogger):
"""Sitemap XML output according to http://www.sitemaps.org/protocol.html
"""

View file

@ -45,7 +45,7 @@ def intify (s):
return 0
class SQLLogger (_Logger):
class SQLLogger(_Logger):
"""
SQL output, should work with any SQL database (not tested).
"""

View file

@ -22,7 +22,7 @@ from .. import ansicolor, strformat, configuration, i18n
from builtins import str as str_text
class TextLogger (_Logger):
class TextLogger(_Logger):
"""
A text logger, colorizing the output if possible.

View file

@ -43,7 +43,7 @@ def xmlquoteattr (s):
return xml.sax.saxutils.escape(s, xmlattr_entities)
class _XMLLogger (_Logger):
class _XMLLogger(_Logger):
"""Base class for XML output; easy to parse with any XML tool."""
def __init__ (self, **kwargs):

View file

@ -65,7 +65,7 @@ class VirusCheck(_ContentPlugin):
return config
class ClamavError (Exception):
class ClamavError(Exception):
"""Raised on clamav errors."""
pass
@ -149,7 +149,7 @@ def get_sockinfo (host, port=None):
return socket.getaddrinfo(host, port, family, socktype)
class ClamavConfig (dict):
class ClamavConfig(dict):
"""Clamav configuration wrapper, with clamd connection method."""
def __init__ (self, filename):

View file

@ -19,7 +19,7 @@ Support for managing threads.
import threading
class StoppableThread (threading.Thread):
class StoppableThread(threading.Thread):
"""Thread class with a stop() method. The thread itself has to check
regularly for the stopped() condition."""

View file

@ -95,7 +95,7 @@ def get_portable():
return os.environ.get('LINKCHECKER_PORTABLE', '0')
class MyInstallLib (install_lib):
class MyInstallLib(install_lib):
"""Custom library installation."""
def install (self):
@ -155,7 +155,7 @@ class MyInstallLib (install_lib):
return outs
class MyInstallData (install_data):
class MyInstallData(install_data):
"""Fix file permissions."""
def run (self):
@ -205,7 +205,7 @@ class MyInstallData (install_data):
os.chmod(path, mode)
class MyDistribution (Distribution):
class MyDistribution(Distribution):
"""Custom distribution class generating config file."""
def __init__ (self, attrs):
@ -284,7 +284,7 @@ def check_manifest ():
print('\nMissing: '.join(err))
class MyBuild (build):
class MyBuild(build):
"""Custom build command."""
def run (self):
@ -293,7 +293,7 @@ class MyBuild (build):
build.run(self)
class MyClean (clean):
class MyClean(clean):
"""Custom clean command."""
def run (self):
@ -308,7 +308,7 @@ class MyClean (clean):
clean.run(self)
class MySdist (sdist):
class MySdist(sdist):
"""Custom sdist command."""
def get_file_list (self):

View file

@ -32,7 +32,7 @@ from builtins import str as str_text
get_url_from = linkcheck.checker.get_url_from
class TestLogger (linkcheck.logger._Logger):
class TestLogger(linkcheck.logger._Logger):
"""
Output logger for automatic regression tests.
"""
@ -183,7 +183,7 @@ def get_test_aggregate (confargs, logargs, logger=TestLogger):
return linkcheck.director.get_aggregate(config)
class LinkCheckTest (unittest.TestCase):
class LinkCheckTest(unittest.TestCase):
"""
Functional test class with ability to test local files.
"""
@ -273,7 +273,7 @@ class LinkCheckTest (unittest.TestCase):
self.fail(os.linesep.join(l))
class MailTest (LinkCheckTest):
class MailTest(LinkCheckTest):
"""Test mailto: link checking."""
def mail_valid (self, addr, **kwargs):

View file

@ -26,7 +26,7 @@ from . import LinkCheckTest
TIMEOUT = 5
class FtpServerTest (LinkCheckTest):
class FtpServerTest(LinkCheckTest):
"""Start/stop an FTP server that can be used for testing."""
def __init__ (self, methodName='runTest'):

View file

@ -30,7 +30,7 @@ from . import LinkCheckTest
from .. import get_file
class StoppableHttpRequestHandler (SimpleHTTPRequestHandler):
class StoppableHttpRequestHandler(SimpleHTTPRequestHandler):
"""
HTTP request handler with QUIT stopping the server.
"""
@ -55,7 +55,7 @@ StoppableHttpRequestHandler.extensions_map.update({
})
class StoppableHttpServer (HTTPServer):
class StoppableHttpServer(HTTPServer):
"""
HTTP server that reacts to self.stop flag.
"""
@ -69,7 +69,7 @@ class StoppableHttpServer (HTTPServer):
self.handle_request()
class NoQueryHttpRequestHandler (StoppableHttpRequestHandler):
class NoQueryHttpRequestHandler(StoppableHttpRequestHandler):
"""
Handler ignoring the query part of requests and sending dummy directory
listings.
@ -147,7 +147,7 @@ class NoQueryHttpRequestHandler (StoppableHttpRequestHandler):
return f
class HttpServerTest (LinkCheckTest):
class HttpServerTest(LinkCheckTest):
"""
Start/stop an HTTP server that can be used for testing.
"""
@ -243,7 +243,7 @@ def get_cookie (maxage=2000):
return "; ".join('%s="%s"' % (key, value) for key, value in data)
class CookieRedirectHttpRequestHandler (NoQueryHttpRequestHandler):
class CookieRedirectHttpRequestHandler(NoQueryHttpRequestHandler):
"""Handler redirecting certain requests, and setting cookies."""
def end_headers (self):

View file

@ -25,7 +25,7 @@ from . import LinkCheckTest
TIMEOUT = 5
class TelnetServerTest (LinkCheckTest):
class TelnetServerTest(LinkCheckTest):
"""Start/stop a Telnet server that can be used for testing."""
def __init__ (self, methodName='runTest'):

View file

@ -19,7 +19,7 @@ Test html anchor parsing and checking.
from . import LinkCheckTest
class TestAnchor (LinkCheckTest):
class TestAnchor(LinkCheckTest):
"""
Test anchor checking of HTML pages.
"""

View file

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

View file

@ -21,7 +21,7 @@ from .. import need_network, need_biplist
import os
class TestBookmarks (LinkCheckTest):
class TestBookmarks(LinkCheckTest):
"""
Test bookmark link checking and content parsing.
"""

View file

@ -19,7 +19,7 @@ Test html <base> tag parsing.
from . import LinkCheckTest
class TestBase (LinkCheckTest):
class TestBase(LinkCheckTest):
"""
Test, if charset encoding is done right.
The linkchecker should translate the encoding

View file

@ -20,7 +20,7 @@ Test error checking.
from . import LinkCheckTest
class TestError (LinkCheckTest):
class TestError(LinkCheckTest):
"""
Test unrecognized or syntactically wrong links.
"""

View file

@ -42,7 +42,7 @@ def unzip (filename, targetdir):
outfile.close()
class TestFile (LinkCheckTest):
class TestFile(LinkCheckTest):
"""
Test file:// link checking (and file content parsing).
"""

View file

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

View file

@ -20,7 +20,7 @@ from .. import need_pyftpdlib
from .ftpserver import FtpServerTest
class TestFtp (FtpServerTest):
class TestFtp(FtpServerTest):
"""Test ftp: link checking."""
@need_pyftpdlib

View file

@ -22,7 +22,7 @@ import pytest
from tests import need_network
from .httpserver import HttpServerTest, CookieRedirectHttpRequestHandler
class TestHttp (HttpServerTest):
class TestHttp(HttpServerTest):
"""Test http:// link checking."""
def __init__(self, methodName='runTest'):

View file

@ -19,7 +19,7 @@ Test http checking.
from .httpserver import HttpServerTest
from tests import need_network
class TestHttpMisc (HttpServerTest):
class TestHttpMisc(HttpServerTest):
"""Test http:// misc link checking."""
@need_network

View file

@ -19,7 +19,7 @@ Test http checking.
from tests import need_network
from .httpserver import HttpServerTest, CookieRedirectHttpRequestHandler
class TestHttpRedirect (HttpServerTest):
class TestHttpRedirect(HttpServerTest):
"""Test http:// link redirection checking."""
def __init__(self, methodName='runTest'):

View file

@ -18,7 +18,7 @@ Test http checking.
"""
from .httpserver import HttpServerTest
class TestHttpRobots (HttpServerTest):
class TestHttpRobots(HttpServerTest):
"""Test robots.txt link checking behaviour."""
def test_html (self):

View file

@ -18,7 +18,7 @@ Test http checking.
"""
from .httpserver import HttpServerTest, CookieRedirectHttpRequestHandler
class TestHttpsRedirect (HttpServerTest):
class TestHttpsRedirect(HttpServerTest):
"""Test https:// link redirection checking."""
def __init__(self, methodName='runTest'):
@ -44,7 +44,7 @@ class TestHttpsRedirect (HttpServerTest):
self.direct(url, resultlines, recursionlevel=0)
class RedirectHttpsRequestHandler (CookieRedirectHttpRequestHandler):
class RedirectHttpsRequestHandler(CookieRedirectHttpRequestHandler):
def redirect (self):
"""Redirect request."""

View file

@ -21,7 +21,7 @@ import linkcheck.configuration
from .__init__ import LinkCheckTest, get_url_from
class TestInternpat (LinkCheckTest):
class TestInternpat(LinkCheckTest):
"""Test internal pattern."""
def test_trailing_slash (self):

View file

@ -19,7 +19,7 @@ Test mail checking of bad mail addresses.
from . import MailTest
class TestMailBad (MailTest):
class TestMailBad(MailTest):
"""Test mailto: link checking."""
def test_error_mail (self):

View file

@ -20,7 +20,7 @@ from tests import need_network
from . import MailTest
class TestMailGood (MailTest):
class TestMailGood(MailTest):
"""
Test mailto: link checking.
"""

View file

@ -20,7 +20,7 @@ from tests import need_network
from . import LinkCheckTest
class TestMisc (LinkCheckTest):
class TestMisc(LinkCheckTest):
"""
Test misc link types.
"""

View file

@ -32,7 +32,7 @@ NNTP_TIMEOUT_SECS = 30
# disabled for now until some stable news server comes up
@pytest.mark.skip(reason="disabled for now until some stable news server comes up")
class TestNews (LinkCheckTest):
class TestNews(LinkCheckTest):
"""Test nntp: and news: link checking."""
def newstest (self, url, resultlines):

View file

@ -20,7 +20,7 @@ from test.support import EnvironmentVarGuard
from . import httpserver
class TestProxy (httpserver.HttpServerTest):
class TestProxy(httpserver.HttpServerTest):
"""Test no_proxy env var handling."""
def test_noproxy (self):

View file

@ -19,7 +19,7 @@ Test telnet checking.
from .telnetserver import TelnetServerTest
class TestTelnet (TelnetServerTest):
class TestTelnet(TelnetServerTest):
"""Test telnet: link checking."""
def test_telnet_error (self):

View file

@ -19,7 +19,7 @@ Test checking of unknown URLs.
from . import LinkCheckTest
class TestUnknown (LinkCheckTest):
class TestUnknown(LinkCheckTest):
"""Test unknown URL scheme checking."""
def test_skype (self):

View file

@ -20,7 +20,7 @@ from tests import need_network
from . import LinkCheckTest
class TestWhitespace (LinkCheckTest):
class TestWhitespace(LinkCheckTest):
"""
Test whitespace in URLs.
"""

View file

@ -31,7 +31,7 @@ def get_file (filename=None):
return str_text(directory)
class TestConfig (unittest.TestCase):
class TestConfig(unittest.TestCase):
"""Test configuration parsing."""
def test_confparse (self):

View file

@ -19,7 +19,7 @@ import os
from linkcheck.logger.csvlog import CSVLogger
class TestCsvLogger (unittest.TestCase):
class TestCsvLogger(unittest.TestCase):
def test_parts (self):
args = dict(

View file

@ -23,7 +23,7 @@ from wsgiref.util import setup_testing_defaults
from linkcheck.lc_cgi import checkform, checklink, LCFormError, application
from linkcheck.strformat import limit
class TestWsgi (unittest.TestCase):
class TestWsgi(unittest.TestCase):
"""Test wsgi application."""
def test_form_valid_url (self):

View file

@ -21,7 +21,7 @@ from tests import need_clamav
from linkcheck.plugins import viruscheck as clamav
class TestClamav (unittest.TestCase):
class TestClamav(unittest.TestCase):
def setUp(self):
self.clamav_conf = clamav.get_clamav_conf("/etc/clamav/clamd.conf")

View file

@ -21,7 +21,7 @@ import unittest
import linkcheck.director.console
class TestConsole (unittest.TestCase):
class TestConsole(unittest.TestCase):
"""Test console operations."""
def test_internal_error (self):

View file

@ -22,7 +22,7 @@ import unittest
import linkcheck.containers
class TestLFUCache (unittest.TestCase):
class TestLFUCache(unittest.TestCase):
"""Test LFU cache implementation."""
def setUp (self):

View file

@ -25,7 +25,7 @@ import linkcheck.configuration
import linkcheck.director
class TestCookies (unittest.TestCase):
class TestCookies(unittest.TestCase):
"""Test cookie routines."""
def test_cookie_parse_multiple_headers (self):

View file

@ -24,7 +24,7 @@ import unittest
import linkcheck.decorators
class TestDecorators (unittest.TestCase):
class TestDecorators(unittest.TestCase):
"""
Test decorators.
"""

View file

@ -22,7 +22,7 @@ import unittest
import linkcheck.dummy
class TestDummy (unittest.TestCase):
class TestDummy(unittest.TestCase):
"""
Test dummy object.
"""

View file

@ -23,7 +23,7 @@ from linkcheck.checker.fileurl import get_nt_filename
from . import need_windows
class TestFilenames (unittest.TestCase):
class TestFilenames(unittest.TestCase):
"""
Test filename routines.
"""

View file

@ -24,7 +24,7 @@ file_existing = __file__
file_non_existing = "ZZZ.i_dont_exist"
class TestFileutil (unittest.TestCase):
class TestFileutil(unittest.TestCase):
"""Test file utility functions."""
def test_size (self):

View file

@ -78,7 +78,7 @@ patterns = (
)
class TestFtpparse (unittest.TestCase):
class TestFtpparse(unittest.TestCase):
"""
Test FTP LIST line parsing.
"""

View file

@ -22,7 +22,7 @@ def run_with_options(options, cmd=linkchecker_cmd):
run_checked([sys.executable, cmd] + options)
class TestLinkchecker (unittest.TestCase):
class TestLinkchecker(unittest.TestCase):
"""Test the linkchecker commandline client."""
def test_linkchecker(self):

View file

@ -21,7 +21,7 @@ import unittest
from linkcheck.htmlutil import htmlsoup, linkparse
class TestLinkparser (unittest.TestCase):
class TestLinkparser(unittest.TestCase):
"""
Test link parsing.
"""

View file

@ -22,7 +22,7 @@ import os
from . import get_file
import linkcheck.mimeutil
class TestMiMeutil (unittest.TestCase):
class TestMiMeutil(unittest.TestCase):
"""Test file utility functions."""
def mime_test (self, filename, mime_expected):

View file

@ -22,7 +22,7 @@ from tests import need_network, need_linux
from linkcheck.network import iputil
class TestNetwork (unittest.TestCase):
class TestNetwork(unittest.TestCase):
"""Test network functions."""
@need_network

View file

@ -132,7 +132,7 @@ parsetests = [
]
class TestParser (unittest.TestCase):
class TestParser(unittest.TestCase):
"""
Test html parser.
"""

View file

@ -37,7 +37,7 @@ def get_pofiles ():
return pofiles
class TestPo (unittest.TestCase):
class TestPo(unittest.TestCase):
"""Test .po file syntax."""
@need_posix
@ -49,7 +49,7 @@ class TestPo (unittest.TestCase):
self.assertEqual(ret, 0, msg="PO-file syntax error in %r" % f)
class TestGTranslator (unittest.TestCase):
class TestGTranslator(unittest.TestCase):
"""GTranslator displays a middot · for a space. Unfortunately, it
gets copied with copy-and-paste, what a shame."""

View file

@ -22,7 +22,7 @@ from tests import need_network
from linkcheck import configuration, robotparser2
class TestRobotParser (unittest.TestCase):
class TestRobotParser(unittest.TestCase):
"""
Test robots.txt parser (needs internet access).
"""

View file

@ -22,7 +22,7 @@ import unittest
import linkcheck.robotparser2
class TestRobotsTxt (unittest.TestCase):
class TestRobotsTxt(unittest.TestCase):
"""
Test string formatting routines.
"""

View file

@ -24,7 +24,7 @@ import time
import linkcheck.strformat
class TestStrFormat (unittest.TestCase):
class TestStrFormat(unittest.TestCase):
"""
Test string formatting routines.
"""

View file

@ -23,7 +23,7 @@ from tests import need_network
import linkcheck.updater
class TestUpdater (unittest.TestCase):
class TestUpdater(unittest.TestCase):
"""Test update check."""
@need_network

View file

@ -41,7 +41,7 @@ def url_norm (url, encoding="utf-8"):
return linkcheck.url.url_norm(url, encoding=encoding)[0]
class TestUrl (unittest.TestCase):
class TestUrl(unittest.TestCase):
"""Test url norming and quoting."""
def urlnormtest (self, url, nurl, encoding=None):

View file

@ -33,7 +33,7 @@ def get_test_aggregate ():
return linkcheck.director.get_aggregate(config)
class TestUrlBuild (unittest.TestCase):
class TestUrlBuild(unittest.TestCase):
"""
Test url building.
"""