jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1197002?usp=email )

Change subject: coverage: hide unrelated code from coverage
......................................................................

coverage: hide unrelated code from coverage

Change-Id: I218c7ee5a2cd007c97742004122c777dfc03dc84
---
M tests/eventstreams_tests.py
M tests/gui_tests.py
M tests/interwikidata_tests.py
3 files changed, 5 insertions(+), 5 deletions(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved




diff --git a/tests/eventstreams_tests.py b/tests/eventstreams_tests.py
index e125901..db51e41 100755
--- a/tests/eventstreams_tests.py
+++ b/tests/eventstreams_tests.py
@@ -141,7 +141,7 @@
         """Test EventStreams filter function settings."""
         def foo() -> bool:
             """Dummy function."""
-            return True
+            return True  # pragma: no cover

         self.es.register_filter(foo)
         self.assertEqual(self.es.filter['all'][0], foo)
diff --git a/tests/gui_tests.py b/tests/gui_tests.py
index daad444..9ff4a7d 100755
--- a/tests/gui_tests.py
+++ b/tests/gui_tests.py
@@ -92,7 +92,7 @@

     try:
         dialog = tkinter.Tk()
-    except RuntimeError as e:
+    except RuntimeError as e:  # pragma: no cover
         raise unittest.SkipTest(f'Skipping due to T380732 - {e}')
     dialog.destroy()

diff --git a/tests/interwikidata_tests.py b/tests/interwikidata_tests.py
index 97291ef..059064f 100755
--- a/tests/interwikidata_tests.py
+++ b/tests/interwikidata_tests.py
@@ -24,11 +24,11 @@

     def put_current(self, *args: Any, **kwargs: Any) -> bool:
         """Prevent editing."""
-        return False
+        raise NotImplementedError

-    def create_item(self) -> bool:
+    def create_item(self) -> pywikibot.ItemPage:
         """Prevent creating items."""
-        return False
+        raise NotImplementedError

     def try_to_add(self) -> None:
         """Prevent adding sitelinks to items."""

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1197002?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: I218c7ee5a2cd007c97742004122c777dfc03dc84
Gerrit-Change-Number: 1197002
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]

Reply via email to