GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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.

Sign up for GitHub

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

Closed
idomic wants to merge 3 commits into python:main from idomic:bpo-10572-testlibs

Uh oh!

There was an error while loading. Please reload this page.

Closed

bpo-10572: Move tkinter tests to /test #18727

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3 commits
Select commit Hold shift + click to select a range
ffa202d
Hard reset + Tkinter module only
idomic Mar 15, 2020
844ce31
Fixing import to point to test
idomic Mar 16, 2020
095a075
Merge branch 'master' into bpo-10572-testlibs
idomic Mar 22, 2020
File filter
Filter by extension

Clear filters
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
Diff view

There are no files selected for viewing

0 Lib/tkinter/test/__init__.py → Lib/__init__.py
Show comments
View file
Open in desktop
File renamed without changes.
2 changes: 1 addition & 1 deletion 2 Lib/test/test_tk.py
Show comments
View file
Open in desktop
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

@merwok merwok Sep 6, 2020

Copy link
Copy Markdown
Member

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.

All reactions
support.requires('gui')

from tkinter.test import runtktests
from test.tkinter_test import runtktests

def test_main():
support.run_unittest(
Expand Down
2 changes: 1 addition & 1 deletion 2 Lib/test/test_ttk_guionly.py
Show comments
View file
Open in desktop
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
2 changes: 1 addition & 1 deletion 2 Lib/test/test_ttk_textonly.py
Show comments
View file
Open in desktop
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

@merwok merwok Sep 6, 2020

Copy link
Copy Markdown
Member

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.

All reactions
Expand Down
0 Lib/tkinter/test/README → Lib/test/tkinter_test/README
Show comments
View file
Open in desktop
File renamed without changes.
0 Lib/tkinter/test/test_tkinter/__init__.py → Lib/test/tkinter_test/__init__.py
Show comments
View file
Open in desktop
File renamed without changes.
2 changes: 1 addition & 1 deletion 2 Lib/tkinter/test/runtktests.py → Lib/test/tkinter_test/runtktests.py
Show comments
View file
Open in desktop
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
0 Lib/tkinter/test/support.py → Lib/test/tkinter_test/support.py
Show comments
View file
Open in desktop
File renamed without changes.
0 Lib/tkinter/test/test_ttk/__init__.py → ...est/tkinter_test/test_tkinter/__init__.py
Show comments
View file
Open in desktop
File renamed without changes.
2 changes: 1 addition & 1 deletion 2 Lib/tkinter/test/test_tkinter/test_font.py → ...st/tkinter_test/test_tkinter/test_font.py
Show comments
View file
Open in desktop
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
4 changes: 2 additions & 2 deletions 4 ...st/test_tkinter/test_geometry_managers.py → ...st/test_tkinter/test_geometry_managers.py
Show comments
View file
Open in desktop
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
2 changes: 1 addition & 1 deletion 2 Lib/tkinter/test/test_tkinter/test_images.py → .../tkinter_test/test_tkinter/test_images.py
Show comments
View file
Open in desktop
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
0 Lib/tkinter/test/test_tkinter/test_loadtk.py → .../tkinter_test/test_tkinter/test_loadtk.py
Show comments
View file
Open in desktop
File renamed without changes.
2 changes: 1 addition & 1 deletion 2 Lib/tkinter/test/test_tkinter/test_misc.py → ...st/tkinter_test/test_tkinter/test_misc.py
Show comments
View file
Open in desktop
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
2 changes: 1 addition & 1 deletion 2 Lib/tkinter/test/test_tkinter/test_text.py → ...st/tkinter_test/test_tkinter/test_text.py
Show comments
View file
Open in desktop
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
0 ...inter/test/test_tkinter/test_variables.py → ...inter_test/test_tkinter/test_variables.py
Show comments
View file
Open in desktop
File renamed without changes.
4 changes: 2 additions & 2 deletions 4 ...tkinter/test/test_tkinter/test_widgets.py → ...tkinter_test/test_tkinter/test_widgets.py
Show comments
View file
Open in desktop
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
Empty file added 0 Lib/test/tkinter_test/test_ttk/__init__.py
Show comments
View file
Open in desktop
Empty file.
2 changes: 1 addition & 1 deletion 2 Lib/tkinter/test/test_ttk/test_extensions.py → .../tkinter_test/test_ttk/test_extensions.py
Show comments
View file
Open in desktop
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
0 Lib/tkinter/test/test_ttk/test_functions.py → ...t/tkinter_test/test_ttk/test_functions.py
Show comments
View file
Open in desktop
File renamed without changes.
2 changes: 1 addition & 1 deletion 2 Lib/tkinter/test/test_ttk/test_style.py → Lib/test/tkinter_test/test_ttk/test_style.py
Show comments
View file
Open in desktop
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
6 changes: 3 additions & 3 deletions 6 Lib/tkinter/test/test_ttk/test_widgets.py → ...est/tkinter_test/test_ttk/test_widgets.py
Show comments
View file
Open in desktop
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
2 changes: 1 addition & 1 deletion 2 Lib/tkinter/test/widget_tests.py → Lib/test/tkinter_test/widget_tests.py
Show comments
View file
Open in desktop
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
4 changes: 2 additions & 2 deletions 4 Makefile.pre.in
Show comments
View file
Open in desktop
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
1 change: 1 addition & 0 deletions 1 Misc/NEWS.d/next/Library/2020-03-15-10-32-15.bpo-10572.62_R7j.rst
Show comments
View file
Open in desktop
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.