jenkins-bot submitted this change.
[tests] Remove unused TestPageReprASCII test class
- remove unused TestPageReprASCII test class
- merge TestPageBaseUnicode to TestPageRepr
Change-Id: I73d2f11f6546e68aef803d4b6bfb2ee2d241b82a
---
M tests/page_tests.py
1 file changed, 7 insertions(+), 28 deletions(-)
diff --git a/tests/page_tests.py b/tests/page_tests.py
index 3ed030b..80f2017 100644
--- a/tests/page_tests.py
+++ b/tests/page_tests.py
@@ -605,17 +605,6 @@
self.assertTrue(coord.primary)
-class TestPageBaseUnicode(DefaultDrySiteTestCase):
-
- """Base class for tests requiring a page using a unicode title."""
-
- @classmethod
- def setUpClass(cls):
- """Initialize page instance."""
- super().setUpClass()
- cls.page = pywikibot.Page(cls.site, 'Ō')
-
-
class TestPageGetFileHistory(DefaultDrySiteTestCase):
"""Test the get_file_history method of the FilePage class."""
@@ -653,10 +642,16 @@
self.assertNotEqual(p.site, self.site)
-class TestPageRepr(TestPageBaseUnicode):
+class TestPageRepr(DefaultDrySiteTestCase):
"""Test for Page's repr implementation."""
+ @classmethod
+ def setUpClass(cls):
+ """Initialize page instance."""
+ super().setUpClass()
+ cls.page = pywikibot.Page(cls.site, 'Ō')
+
def setUp(self):
"""Force the console encoding to UTF-8."""
super().setUp()
@@ -685,22 +680,6 @@
self.assertEqual('{!r}'.format(self.page), "Page('Ō')")
-class TestPageReprASCII(TestPageBaseUnicode):
-
- """Test for Page's repr implementation when using ASCII encoding."""
-
- def setUp(self):
- """Patch the current console encoding to ASCII."""
- super().setUp()
- self._old_encoding = config.console_encoding
- config.console_encoding = 'ascii'
-
- def tearDown(self):
- """Restore the original console encoding."""
- config.console_encoding = self._old_encoding
- super().tearDown()
-
-
class TestPageBotMayEdit(TestCase):
"""Test Page.botMayEdit() method."""
To view, visit change 768196. To unsubscribe, or for help writing mail filters, visit settings.