jenkins-bot has submitted this change and it was merged. Change subject: Bug 58053 - Fix relative imports in tests/ ......................................................................
Bug 58053 - Fix relative imports in tests/ Change-Id: I3c2ed53356d2f01c6929ab8d5c876020080fd0c3 --- M tests/api_tests.py M tests/date_tests.py M tests/dry_api_tests.py M tests/dry_site_tests.py M tests/i18n_tests.py M tests/page_tests.py M tests/pwb_tests.py M tests/site_tests.py M tests/textlib_tests.py M tests/timestripper_tests.py M tests/ui_tests.py M tests/weblib_tests.py M tests/wikibase_tests.py M tests/wikidataquery_tests.py 14 files changed, 20 insertions(+), 15 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/api_tests.py b/tests/api_tests.py index f7401f2..6863935 100644 --- a/tests/api_tests.py +++ b/tests/api_tests.py @@ -9,7 +9,7 @@ import datetime import pywikibot import pywikibot.data.api as api -from utils import PywikibotTestCase, unittest +from tests.utils import PywikibotTestCase, unittest mysite = pywikibot.Site('en', 'wikipedia') diff --git a/tests/date_tests.py b/tests/date_tests.py index bd8d888..2483d33 100644 --- a/tests/date_tests.py +++ b/tests/date_tests.py @@ -6,7 +6,7 @@ # __version__ = '$Id$' -from utils import unittest +from tests.utils import unittest from pywikibot import date diff --git a/tests/dry_api_tests.py b/tests/dry_api_tests.py index c204d36..3cfb04c 100644 --- a/tests/dry_api_tests.py +++ b/tests/dry_api_tests.py @@ -10,7 +10,7 @@ import datetime import pywikibot from pywikibot.data.api import CachedRequest -from utils import unittest +from tests.utils import unittest class DryAPITests(unittest.TestCase): diff --git a/tests/dry_site_tests.py b/tests/dry_site_tests.py index d8e273e..46b1175 100644 --- a/tests/dry_site_tests.py +++ b/tests/dry_site_tests.py @@ -10,7 +10,7 @@ import pywikibot from pywikibot.site import must_be -from utils import PywikibotTestCase, unittest +from tests.utils import PywikibotTestCase, unittest class DrySite(pywikibot.site.APISite): diff --git a/tests/i18n_tests.py b/tests/i18n_tests.py index 6df9a46..20645e7 100644 --- a/tests/i18n_tests.py +++ b/tests/i18n_tests.py @@ -10,7 +10,7 @@ from pywikibot import i18n import shutil -from utils import unittest +from tests.utils import unittest class TestTranslate(unittest.TestCase): diff --git a/tests/page_tests.py b/tests/page_tests.py index 2ae3b26..b20e56b 100644 --- a/tests/page_tests.py +++ b/tests/page_tests.py @@ -13,7 +13,7 @@ import pywikibot import pywikibot.page -from utils import PywikibotTestCase, unittest +from tests.utils import PywikibotTestCase, unittest site = pywikibot.Site('en', 'wikipedia') mainpage = pywikibot.Page(pywikibot.page.Link("Main Page", site)) diff --git a/tests/pwb_tests.py b/tests/pwb_tests.py index 51db60b..6a31c7b 100644 --- a/tests/pwb_tests.py +++ b/tests/pwb_tests.py @@ -11,7 +11,7 @@ import subprocess import pywikibot -from utils import unittest +from tests.utils import unittest pypath = sys.executable basepath = os.path.split(os.path.split(__file__)[0])[0] diff --git a/tests/site_tests.py b/tests/site_tests.py index bdee6d2..bc6b2d7 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -13,7 +13,7 @@ import pywikibot from pywikibot.site import must_be from tests import patch_request, unpatch_request -from utils import PywikibotTestCase, unittest +from tests.utils import PywikibotTestCase, unittest mysite = None mainpage = None diff --git a/tests/textlib_tests.py b/tests/textlib_tests.py index 06770d2..1040552 100644 --- a/tests/textlib_tests.py +++ b/tests/textlib_tests.py @@ -16,7 +16,7 @@ import pywikibot import pywikibot.textlib as textlib -from utils import unittest +from tests.utils import unittest files = {} dirname = os.path.join(os.path.dirname(__file__), "pages") diff --git a/tests/timestripper_tests.py b/tests/timestripper_tests.py index 975fa10..019ac0b 100644 --- a/tests/timestripper_tests.py +++ b/tests/timestripper_tests.py @@ -12,7 +12,7 @@ import datetime import pywikibot -from utils import PywikibotTestCase, unittest +from tests.utils import PywikibotTestCase, unittest from pywikibot.textlib import TimeStripper, tzoneFixedOffset diff --git a/tests/ui_tests.py b/tests/ui_tests.py index ad92448..c072d32 100644 --- a/tests/ui_tests.py +++ b/tests/ui_tests.py @@ -39,7 +39,7 @@ import sys import time -from utils import unittest +from tests.utils import unittest if os.name == "nt": from multiprocessing.managers import BaseManager diff --git a/tests/weblib_tests.py b/tests/weblib_tests.py index fd8e13b..e532f07 100644 --- a/tests/weblib_tests.py +++ b/tests/weblib_tests.py @@ -6,9 +6,14 @@ # __version__ = '$Id$' -from urlparse import urlparse +import sys +if sys.version_info[0] == 2: + from urlparse import urlparse +else: + from urllib.parse import urlparse + import pywikibot.weblib as weblib -from utils import unittest +from tests.utils import unittest class TestArchiveSites(unittest.TestCase): diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py index 9773da5..fc0e267 100644 --- a/tests/wikibase_tests.py +++ b/tests/wikibase_tests.py @@ -14,7 +14,7 @@ import pywikibot import json -from utils import PywikibotTestCase, unittest +from tests.utils import PywikibotTestCase, unittest site = pywikibot.Site('en', 'wikipedia') mainpage = pywikibot.Page(pywikibot.page.Link("Main Page", site)) diff --git a/tests/wikidataquery_tests.py b/tests/wikidataquery_tests.py index cb8373e..d04bfde 100644 --- a/tests/wikidataquery_tests.py +++ b/tests/wikidataquery_tests.py @@ -12,7 +12,7 @@ import pywikibot.data.wikidataquery as query -from utils import unittest +from tests.utils import unittest import pywikibot from pywikibot.page import ItemPage, PropertyPage, Claim -- To view, visit https://gerrit.wikimedia.org/r/98381 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3c2ed53356d2f01c6929ab8d5c876020080fd0c3 Gerrit-PatchSet: 7 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Merlijn van Deen <valhall...@arctus.nl> Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com> Gerrit-Reviewer: Merlijn van Deen <valhall...@arctus.nl> Gerrit-Reviewer: Xqt <i...@gno.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits