[Python-checkins] Use absolute imports in IDLE tests (GH-26581)

miss-islington webhook-mailer at python.org
Mon Jun 7 18:15:41 EDT 2021


https://github.com/python/cpython/commit/8524e32d77b6741cdd7f947c009b10b54c6529b8
commit: 8524e32d77b6741cdd7f947c009b10b54c6529b8
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2021-06-07T15:15:31-07:00
summary:

Use absolute imports in IDLE tests (GH-26581)


Relative imports do not work when running test_x as main.
(cherry picked from commit e915db3e9e512249a6f494c0b331db2d021e1f56)

Co-authored-by: Terry Jan Reedy <tjreedy at udel.edu>

files:
M Lib/idlelib/idle_test/test_colorizer.py

diff --git a/Lib/idlelib/idle_test/test_colorizer.py b/Lib/idlelib/idle_test/test_colorizer.py
index b0b120e75a1553..308bc389384d33 100644
--- a/Lib/idlelib/idle_test/test_colorizer.py
+++ b/Lib/idlelib/idle_test/test_colorizer.py
@@ -3,7 +3,7 @@
 from test.support import requires
 import unittest
 from unittest import mock
-from .tkinter_testing_utils import run_in_tk_mainloop
+from idlelib.idle_test.tkinter_testing_utils import run_in_tk_mainloop
 
 from functools import partial
 import textwrap



More information about the Python-checkins mailing list