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

terryjreedy webhook-mailer at python.org
Mon Jun 7 17:56:38 EDT 2021


https://github.com/python/cpython/commit/e915db3e9e512249a6f494c0b331db2d021e1f56
commit: e915db3e9e512249a6f494c0b331db2d021e1f56
branch: main
author: Terry Jan Reedy <tjreedy at udel.edu>
committer: terryjreedy <tjreedy at udel.edu>
date: 2021-06-07T17:56:34-04:00
summary:

Use absolute imports in IDLE tests (GH-26581)

Relative imports do not work when running test_x as main.

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