jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/831183 )
Change subject: [tests] Rename tk_test to gui_tests because gui module it tested ......................................................................
[tests] Rename tk_test to gui_tests because gui module it tested
Change-Id: Ic7bc6fa405a556b8d5c64e122a6442fe245ef868 --- R docs/tests_ref/gui_tests.rst M docs/tests_ref/index.rst M tests/__init__.py R tests/gui_tests.py M tox.ini 5 files changed, 9 insertions(+), 7 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/docs/tests_ref/tk_tests.rst b/docs/tests_ref/gui_tests.rst similarity index 76% rename from docs/tests_ref/tk_tests.rst rename to docs/tests_ref/gui_tests.rst index 08d5e77..7bd7d37 100644 --- a/docs/tests_ref/tk_tests.rst +++ b/docs/tests_ref/gui_tests.rst @@ -1,7 +1,7 @@ tests.tk_tests module ======================
-.. automodule:: tests.tk_tests +.. automodule:: tests.gui_tests :members: :undoc-members: :show-inheritance: diff --git a/docs/tests_ref/index.rst b/docs/tests_ref/index.rst index 7fe3c74..3a3964c 100644 --- a/docs/tests_ref/index.rst +++ b/docs/tests_ref/index.rst @@ -44,6 +44,7 @@ flow_edit<./flow_edit_tests> flow<./flow_tests> flow_thanks<./flow_thanks_tests> + gui<./gui_tests> http<./http_tests> i18n<./i18n_tests> interwiki_graph<./interwiki_graph_tests> @@ -70,7 +71,6 @@ thread<./thread_tests> time<./time_tests> timestripper<./timestripper_tests> - tk<./tk_tests> tools_chars<./tools_chars_tests> tools_deprecate<./tools_deprecate_tests> tools_formatter<./tools_formatter_tests> diff --git a/tests/__init__.py b/tests/__init__.py index ccac997..f5efe58 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -89,6 +89,7 @@ 'flow', 'flow_edit', 'flow_thanks', + 'gui', 'http', 'i18n', 'interwiki_graph', @@ -120,7 +121,6 @@ 'thread', 'time', 'timestripper', - 'tk', 'token', 'tools', 'tools_chars', diff --git a/tests/tk_tests.py b/tests/gui_tests.py similarity index 93% rename from tests/tk_tests.py rename to tests/gui_tests.py index 9da6915..2a6f709 100755 --- a/tests/tk_tests.py +++ b/tests/gui_tests.py @@ -40,7 +40,7 @@
"""Test Tkdialog."""
- def testTkdialog(self): + def test_tk_dialog(self): """Test Tk dialog.""" desc = 'foo' image = 'tests/data/images/MP_sounds.png' @@ -58,7 +58,7 @@
"""Test Tkinter."""
- def testTkinter(self): + def test_tkinter(self): """Test Tkinter window.""" root = tkinter.Tk() root.resizable(width=tkinter.FALSE, height=tkinter.FALSE) @@ -75,7 +75,10 @@ @require_modules('tkinter') @require_modules('PIL') def setUpModule(): - """Skip tests if tkinter is not installed. Otherwise import it.""" + """Skip tests if tkinter or PIL is not installed. + + Otherwise import modules. + """ global EditBoxWindow, Tkdialog, tkinter import tkinter from pywikibot.userinterfaces.gui import EditBoxWindow, Tkdialog diff --git a/tox.ini b/tox.ini index 654e9aa..6ae564f 100644 --- a/tox.ini +++ b/tox.ini @@ -198,7 +198,6 @@ tests/sparql_tests.py: N802 tests/textlib_tests.py: N802 tests/thread_tests.py: N802 - tests/tk_tests.py: N802 tests/tools_formatter_tests.py: N802 tests/tools_tests.py: N802 tests/ui_options_tests.py: N802
pywikibot-commits@lists.wikimedia.org