jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[fix] Restore compare tests and doc strings

Change-Id: I9e835ade34891a003ac412b0a9496060fd67beab
---
M pywikibot/date.py
M pywikibot/logging.py
M pywikibot/userinterfaces/terminal_interface_win32.py
M tests/family_tests.py
M tests/logentries_tests.py
5 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/pywikibot/date.py b/pywikibot/date.py
index 17f5563..291a911 100644
--- a/pywikibot/date.py
+++ b/pywikibot/date.py
@@ -552,7 +552,7 @@
# This is useful when trying to decide if a certain article is a localized date
# or not, or generating dates.
# See dh() for additional information.
-class MonthNames(Mapping):
+class MonthNames(abc.Mapping):

"""A Mapping which reads month names from MediaWiki messages."""

diff --git a/pywikibot/logging.py b/pywikibot/logging.py
index c6db03d..4bbc2ca 100644
--- a/pywikibot/logging.py
+++ b/pywikibot/logging.py
@@ -35,9 +35,9 @@
from pywikibot.backports import Callable, List


-STDOUT = 16
-VERBOSE = 18
-INPUT = 25
+STDOUT = 16 #:
+VERBOSE = 18 #:
+INPUT = 25 #:

_init_routines = [] # type: List[Callable[[], Any]]
_inited_routines = set()
diff --git a/pywikibot/userinterfaces/terminal_interface_win32.py b/pywikibot/userinterfaces/terminal_interface_win32.py
index 58b9a89..f1f9f66 100644
--- a/pywikibot/userinterfaces/terminal_interface_win32.py
+++ b/pywikibot/userinterfaces/terminal_interface_win32.py
@@ -52,7 +52,7 @@
return target_stream.isatty()

def encounter_color(self, color,
- target_stream) -> None: # pragma: no cover
+ target_stream) -> None: # pragma: no cover
"""Set the new color."""
fg, bg = self.divide_color(color)
windows_color = windowsColors[fg]
diff --git a/tests/family_tests.py b/tests/family_tests.py
index 17fa26a..b212c20 100755
--- a/tests/family_tests.py
+++ b/tests/family_tests.py
@@ -80,12 +80,14 @@
family = Family.load('wikipedia')
other = 'wikipedia'
self.assertEqual(family, other)
+ self.assertFalse(family != other) # noqa: H204

def test_ne_family_with_string_repr_different_family(self):
"""Test that Family and string with different name are not equal."""
family = Family.load('wikipedia')
other = 'wikisource'
self.assertNotEqual(family, other)
+ self.assertFalse(family == other) # noqa: H204

def test_eq_family_with_string_repr_not_existing_family(self):
"""Test that Family and string with different name are not equal."""
diff --git a/tests/logentries_tests.py b/tests/logentries_tests.py
index 357f13b..30717be 100755
--- a/tests/logentries_tests.py
+++ b/tests/logentries_tests.py
@@ -279,6 +279,7 @@
le4 = next(gen1)
le5 = next(gen2)
self.assertEqual(le1, le2)
+ self.assertFalse(le1 != le2) # noqa: H204
self.assertNotEqual(le1, le3)
self.assertNotEqual(le1, site)
self.assertIsInstance(le4, OtherLogEntry)

To view, visit change 773924. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I9e835ade34891a003ac412b0a9496060fd67beab
Gerrit-Change-Number: 773924
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged