Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1172857?usp=email )
Change subject: Coverage: Update exclude_also list to skip and skip
Python314AssertionsMixin
......................................................................
Coverage: Update exclude_also list to skip and skip Python314AssertionsMixin
Change-Id: I438647734891dcd12e9b9c69bdc2f9918f01ee46
---
M pyproject.toml
M tests/aspects.py
2 files changed, 15 insertions(+), 12 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pyproject.toml b/pyproject.toml
index 00856f0..fbfdc1a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -124,24 +124,27 @@
skip_empty = true
exclude_also = [
- # Have to re-enable the standard pragma
+ "@(abc\\.)?abstractmethod",
+ "@deprecated\\([^\\)]+\\)",
+ "@unittest\\.skip",
+ "class .+\\bProtocol\\):",
"except ImportError",
"except KeyboardInterrupt",
"except OSError",
- "except \\w*ServerError",
"except SyntaxError",
+ "except \\w*ServerError",
+ "if (0|False):",
+ "if .+PYWIKIBOT_TEST_\\w+.+:",
+ "if TYPE_CHECKING:",
+ "if __debug__:",
+ "if __name__ == .__main__.:",
+ "if self\\.mw_version < .+:",
+ # Comments to turn coverage on and off:
+ "no cover: start(?s:.)*?no cover: stop",
"raise ImportError",
"raise NotImplementedError",
"raise unittest\\.SkipTest",
"self\\.skipTest",
- "if __name__ == .__main__.:",
- "if .+PYWIKIBOT_TEST_\\w+.+:",
- "if self\\.mw_version < .+:",
- "@(abc\\.)?abstractmethod",
- "@deprecated\\([^\\)]+\\)",
- "@unittest\\.skip",
- # Comments to turn coverage on and off:
- "no cover: start(?s:.)*?no cover: stop",
]
diff --git a/tests/aspects.py b/tests/aspects.py
index 41f6e6e..0a29a4a 100644
--- a/tests/aspects.py
+++ b/tests/aspects.py
@@ -65,7 +65,7 @@
pywikibot.bot.set_interface('buffer')
-class Python314AssertionsMixin:
+class Python314AssertionsMixin: # pragma: no cover
"""Mixin providing assertion methods added in Python 3.14 for unittest.
@@ -779,7 +779,7 @@
continue
if not site.logged_in():
- site.login()
+ site.login() # pragma: no cover
if skip_if_login_fails and not site.user(): # during setUp() only
self.skipTest(
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1172857?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: I438647734891dcd12e9b9c69bdc2f9918f01ee46
Gerrit-Change-Number: 1172857
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]