From 4211e8aecdce600095ace8cc1baa659a4b17b91e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Dlouh=C3=BD?= Date: Fri, 27 Jan 2017 02:11:27 +0100 Subject: [PATCH] fixes for Python 3: fix test_internpat and test_news --- tests/__init__.py | 4 ++-- tests/checker/test_internpat.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/__init__.py b/tests/__init__.py index 995c8b1a..e011be7d 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -216,7 +216,7 @@ def need_newsserver (server): if not has_newsserver(server): pytest.skip("Newsserver `%s' is not available" % server) return func(*args, **kwargs) - newfunc.func_name = func.func_name + newfunc.__name__ = func.__name__ return newfunc return check_func @@ -274,7 +274,7 @@ def limit_time (seconds, skip=False): if skip: pytest.skip("time limit of %d seconds exceeded" % seconds) assert False, msg - new_func.func_name = func.func_name + new_func.__name__ = func.__name__ return new_func return run_limited diff --git a/tests/checker/test_internpat.py b/tests/checker/test_internpat.py index b0d9d238..6ea2b9f1 100644 --- a/tests/checker/test_internpat.py +++ b/tests/checker/test_internpat.py @@ -19,7 +19,7 @@ Test internal pattern construction """ import linkcheck.director import linkcheck.configuration -from __init__ import LinkCheckTest, get_url_from +from .__init__ import LinkCheckTest, get_url_from class TestInternpat (LinkCheckTest):