jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1210058?usp=email )
Change subject: tests: update coverage settings
......................................................................
tests: update coverage settings
Change-Id: Idd8a7c96ab62eb63dba795bd612c22804568117b
---
M pywikibot/scripts/generate_family_file.py
M tests/logentries_tests.py
M tests/script_tests.py
M tests/site_detect_tests.py
4 files changed, 5 insertions(+), 5 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/scripts/generate_family_file.py
b/pywikibot/scripts/generate_family_file.py
index 1c38213..72c7d2c 100755
--- a/pywikibot/scripts/generate_family_file.py
+++ b/pywikibot/scripts/generate_family_file.py
@@ -100,7 +100,7 @@
@staticmethod
def show(*args, **kwargs):
"""Wrapper around print to be mocked in tests."""
- print(*args, **kwargs)
+ print(*args, **kwargs) # pragma: no cover
def get_params(self) -> bool:
"""Ask for parameters if necessary."""
diff --git a/tests/logentries_tests.py b/tests/logentries_tests.py
index 9b4447e..e62f9ad 100755
--- a/tests/logentries_tests.py
+++ b/tests/logentries_tests.py
@@ -77,7 +77,7 @@
self.assertEqual(logentry._expected_type, logtype)
if logtype not in LogEntryFactory._logtypes:
- self.assertIsInstance(logentry, OtherLogEntry)
+ self.assertIsInstance(logentry, OtherLogEntry) # pragma: no cover
# check that we only have the new implementation
self.assertNotIn(logentry.type(), logentry.data)
@@ -112,7 +112,7 @@
self.assertGreaterEqual(logentry.ns(), -2)
self.assertGreaterEqual(logentry.pageid(), 0)
if logtype == 'block' and logentry.isAutoblockRemoval:
- self.assertIsInstance(logentry.page(), int)
+ self.assertIsInstance(logentry.page(), int) # pragma: no cover
elif isinstance(logentry, UserTargetLogEntry):
self.assertIsInstance(logentry.page(), pywikibot.User)
elif logtype == 'upload':
diff --git a/tests/script_tests.py b/tests/script_tests.py
index 9fa0310..91fb74a 100755
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -39,7 +39,7 @@
if script_name in script_deps:
for package_name in script_deps[script_name]:
if not has_module(package_name):
- return False
+ return False # pragma: no cover
return True
diff --git a/tests/site_detect_tests.py b/tests/site_detect_tests.py
index 28de946..c0cde71 100755
--- a/tests/site_detect_tests.py
+++ b/tests/site_detect_tests.py
@@ -114,7 +114,7 @@
"""Test detection of proofwiki.org site."""
if os.getenv('GITHUB_ACTIONS'):
self.skipTest('Skip test on github due to T331223')
- self.assertSite('http://proofwiki.org/wiki/$1')
+ self.assertSite('http://proofwiki.org/wiki/$1') # pragma: no cover
def test_non_standard_version_sites(self) -> None:
"""Test detection of non standard MediaWiki sites."""
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1210058?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Idd8a7c96ab62eb63dba795bd612c22804568117b
Gerrit-Change-Number: 1210058
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]