jenkins-bot has submitted this change and it was merged.
Change subject: Add support for nosetests ......................................................................
Add support for nosetests
nosetests finds tests automatically, including test_data_ingestion.py which fails on the import. It has slightly different rules for auto-detecting tests, and it tries to use get_test_unconnected_page as a test.
Change-Id: I49fc3cbda3f1f3b42c795b4f007e59d9bb1d6cf5 --- M scripts/tests/test_data_ingestion.py M tests/wikibase_tests.py 2 files changed, 3 insertions(+), 3 deletions(-)
Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/tests/test_data_ingestion.py b/scripts/tests/test_data_ingestion.py index 36fa0fb..c34033d 100644 --- a/scripts/tests/test_data_ingestion.py +++ b/scripts/tests/test_data_ingestion.py @@ -6,7 +6,7 @@
import os import unittest -import data_ingestion +from scripts import data_ingestion
class TestPhoto(unittest.TestCase): diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py index aca60b3..b5f5780 100644 --- a/tests/wikibase_tests.py +++ b/tests/wikibase_tests.py @@ -26,7 +26,7 @@
# fetch a page which is very likely to be unconnected, which doesnt have # a generator, and unit tests may be used to test old versions of pywikibot -def get_test_unconnected_page(site): +def _get_test_unconnected_page(site): gen = pagegenerators.NewpagesPageGenerator(site=site, total=10, namespaces=[1, ]) for page in gen: @@ -348,7 +348,7 @@
def test_fromPage_noitem(self): # this is a new page, and should not have a wikidata item yet - page = get_test_unconnected_page(site) + page = _get_test_unconnected_page(site) link = page._link self._test_fromPage_noitem(link)
pywikibot-commits@lists.wikimedia.org