[Python-checkins] cpython (2.7): Issue #5124: For 2.7, move requires('gui') from module level to setUpClass.

terry.reedy python-checkins at python.org
Sat Jun 11 16:26:29 EDT 2016


https://hg.python.org/cpython/rev/274308a3b8b6
changeset:   101890:274308a3b8b6
branch:      2.7
parent:      101886:b3ce713fb9be
user:        Terry Jan Reedy <tjreedy at udel.edu>
date:        Sat Jun 11 16:26:10 2016 -0400
summary:
  Issue #5124: For 2.7, move requires('gui') from module level to setUpClass.

files:
  Lib/idlelib/idle_test/test_editmenu.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/idlelib/idle_test/test_editmenu.py b/Lib/idlelib/idle_test/test_editmenu.py
--- a/Lib/idlelib/idle_test/test_editmenu.py
+++ b/Lib/idlelib/idle_test/test_editmenu.py
@@ -3,7 +3,6 @@
 Edit modules have their own test files files
 '''
 from test.test_support import requires
-requires('gui')
 import Tkinter as tk
 import unittest
 from idlelib import PyShell
@@ -15,6 +14,7 @@
     '''
     @classmethod
     def setUpClass(cls):
+        requires('gui')
         cls.root = root = tk.Tk()
         PyShell.fix_x11_paste(root)
         cls.text = tk.Text(root)

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list