diff --git a/tests/checker/ftpserver.py b/tests/checker/ftpserver.py index 4c26471a..ea35a99b 100644 --- a/tests/checker/ftpserver.py +++ b/tests/checker/ftpserver.py @@ -53,7 +53,11 @@ def start_server (host, port): if "kill" in msg: raise KeyboardInterrupt() - from pyftpdlib import ftpserver + try: + from pyftpdlib import ftpserver + except ImportError: + pytest.skip("pyftpdlib is not available") + return authorizer = ftpserver.DummyAuthorizer() datadir = os.path.join(os.path.dirname(__file__), 'data') authorizer.add_anonymous(datadir) diff --git a/tests/checker/test_news.py b/tests/checker/test_news.py index 0be35aea..00a89e39 100644 --- a/tests/checker/test_news.py +++ b/tests/checker/test_news.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2004-2010 Bastian Kleineidam +# Copyright (C) 2004-2010,2014 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 @@ -24,13 +24,13 @@ from . import LinkCheckTest # to enable the has_newsserver() resource manually. NNTP_SERVER = "news.uni-stuttgart.de" # info string returned by news server -NNTP_INFO = u"201 news.uni-stuttgart.de InterNetNews NNRP server " \ - u"INN 2.4.4 (20060818 snapshot) ready (no posting)." +NNTP_INFO = u"200 news.uni-stuttgart.de InterNetNews NNRP server " \ + u"INN 2.5.2 ready (no posting)" # Most free NNTP servers are slow, so don't waist a lot of time running those. NNTP_TIMEOUT_SECS = 30 # 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): diff --git a/tests/test_filenames.py b/tests/test_filenames.py index 4acf5fa2..77c887fa 100644 --- a/tests/test_filenames.py +++ b/tests/test_filenames.py @@ -37,8 +37,8 @@ class TestFilenames (unittest.TestCase): path = 'c:\\' realpath = get_nt_filename(path) self.assertEqual(path, realpath) - # Only works on my computer. + # XXX Only works on my computer. # Is there a Windows UNC share that is always available for tests? - path = '\\Vboxsrv\share\msg.txt' - realpath = get_nt_filename(path) - self.assertEqual(path, realpath) + #path = '\\Vboxsrv\share\msg.txt' + #realpath = get_nt_filename(path) + #self.assertEqual(path, realpath) diff --git a/tests/test_strformat.py b/tests/test_strformat.py index 4fbfcf03..75ea0eb6 100644 --- a/tests/test_strformat.py +++ b/tests/test_strformat.py @@ -60,7 +60,7 @@ class TestStrFormat (unittest.TestCase): self.assertEqual(wrap(s, -1), s) self.assertEqual(wrap(s, 0), s) l = len(os.linesep) - gap = " "*l + gap = " " s2 = "11%(gap)s22%(sep)s33%(gap)s44%(sep)s55" % \ {'sep': os.linesep, 'gap': gap} # splitting lines