GeezerVison is showing github.com — bpo-10572: Move tkinter tests to /test by idomic · Pull Request #18727 · python/cpython
bpo-10572: Move tkinter tests to /test
#18727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement . We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Uh oh!
There was an error while loading. Please reload this page.
Show file tree
Hide file tree
Changes from all commits
Commits
File filter
Filter by extension
.in
(1)
.py
(22)
.rst
(1)
No extension
(1)
All 4 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Hide whitespace
Diff view
Hide whitespace
There are no files selected for viewing
File renamed without changes.
Original file line number
Diff line number
Diff line change
Expand Up
@@ -5,7 +5,7 @@
# Skip test if tk cannot be initialized.
Comment thread
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more .
Lib/__init__.py should be deleted.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
support.requires('gui')
from tkinter. test import runtktests
from test.tkinter_test import runtktests
def test_main():
support.run_unittest(
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -10,7 +10,7 @@
import tkinter
from _tkinter import TclError
from tkinter import ttk
from tkinter. test import runtktests
from test.tkinter_test import runtktests
root = None
try:
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -3,7 +3,7 @@
# Skip this test if _tkinter does not exist.
support.import_module('_tkinter')
from tkinter. test import runtktests
from test.tkinter_test import runtktests
def test_main():
support.run_unittest(
Comment thread
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more .
After moving the tests, files like this (just contains an import and a wrapper to interface runtests with test_ttk) end up being a slightly confusing, mostly unneeded layer.
As long as many files are moved and history is broken, why not also clean up this tangle by merging the compat layer into the real test files?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number
Diff line number
Diff line change
Expand Up
@@ -45,7 +45,7 @@ def get_tests_modules(basepath=this_dir_path, gui=True, packages=None):
try:
yield importlib.import_module(
".%s.%s" % (pkg_name, name[:-len(py_ext)]),
"tkinter. test")
"test.tkinter_test ")
except test.support.ResourceDenied:
if gui:
raise
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number
Diff line number
Diff line change
Expand Up
@@ -2,7 +2,7 @@
import tkinter
from tkinter import font
from test.support import requires, run_unittest, gc_collect, ALWAYS_EQ
from tkinter. test.support import AbstractTkTest
from test.tkinter_test .support import AbstractTkTest
requires('gui')
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -4,8 +4,8 @@
from tkinter import TclError
from test.support import requires
from tkinter. test.support import pixels_conv, tcl_version, requires_tcl
from tkinter. test.widget_tests import AbstractWidgetTest
from test.tkinter_test .support import pixels_conv, tcl_version, requires_tcl
from test.tkinter_test .widget_tests import AbstractWidgetTest
requires('gui')
Expand Down
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
import unittest
import tkinter
from test import support
from tkinter. test.support import AbstractTkTest, requires_tcl
from test.tkinter_test .support import AbstractTkTest, requires_tcl
support.requires('gui')
Expand Down
File renamed without changes.
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
import unittest
import tkinter
from test import support
from tkinter. test.support import AbstractTkTest
from test.tkinter_test .support import AbstractTkTest
support.requires('gui')
Expand Down
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
import unittest
import tkinter
from test.support import requires, run_unittest
from tkinter. test.support import AbstractTkTest
from test.tkinter_test .support import AbstractTkTest
requires('gui')
Expand Down
File renamed without changes.
Original file line number
Diff line number
Diff line change
Expand Up
@@ -5,9 +5,9 @@
import sys
from test.support import requires
from tkinter. test.support import (tcl_version, requires_tcl,
from test.tkinter_test .support import (tcl_version, requires_tcl,
get_tk_patchlevel, widget_eq)
from tkinter. test.widget_tests import (
from test.tkinter_test .widget_tests import (
add_standard_options, noconv, pixels_round,
AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests,
setUpModule)
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -3,7 +3,7 @@
import tkinter
from tkinter import ttk
from test.support import requires, run_unittest, swap_attr
from tkinter. test.support import AbstractTkTest, destroy_default_root
from test.tkinter_test .support import AbstractTkTest, destroy_default_root
requires('gui')
Expand Down
File renamed without changes.
Original file line number
Diff line number
Diff line change
Expand Up
@@ -2,7 +2,7 @@
import tkinter
from tkinter import ttk
from test.support import requires, run_unittest
from tkinter. test.support import AbstractTkTest
from test.tkinter_test .support import AbstractTkTest
requires('gui')
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -4,10 +4,10 @@
from test.support import requires
import sys
from tkinter. test.test_ttk.test_functions import MockTclObj
from tkinter. test.support import (AbstractTkTest, tcl_version, get_tk_patchlevel,
from test.tkinter_test .test_ttk.test_functions import MockTclObj
from test.tkinter_test .support import (AbstractTkTest, tcl_version, get_tk_patchlevel,
simulate_mouse_click)
from tkinter. test.widget_tests import (add_standard_options, noconv,
from test.tkinter_test .widget_tests import (add_standard_options, noconv,
AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests,
setUpModule)
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -3,7 +3,7 @@
import unittest
import sys
import tkinter
from tkinter. test.support import (AbstractTkTest, tcl_version, requires_tcl,
from test.tkinter_test .support import (AbstractTkTest, tcl_version, requires_tcl,
get_tk_patchlevel, pixels_conv, tcl_obj_eq)
import test.support
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -1325,8 +1325,8 @@ maninstall: altmaninstall
# Install the library
XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
LIBSUBDIRS= tkinter tkinter/ test tkinter/ test/test_tkinter \
tkinter/ test/test_ttk site-packages test \
LIBSUBDIRS= tkinter test/tkinter_test test/tkinter_test /test_tkinter \
test/tkinter_test /test_ttk site-packages test \
test/audiodata \
test/capath test/data \
test/cjkencodings test/decimaltestdata \
Expand Down
Original file line number
Diff line number
Diff line change
@@ -0,0 +1 @@
Moved these class tests: `tkinter.test` to be under `test/tkinter_test`
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.