]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #5124: For 2.7, move requires('gui') from module level to setUpClass.
authorTerry Jan Reedy <tjreedy@udel.edu>
Sat, 11 Jun 2016 20:26:10 +0000 (16:26 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Sat, 11 Jun 2016 20:26:10 +0000 (16:26 -0400)
Lib/idlelib/idle_test/test_editmenu.py

index d352240eacd652b442abe742b5e91676ecd8a289..1d3606932d198007f2203a7b8454ea68aab3e288 100644 (file)
@@ -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 @@ class PasteTest(unittest.TestCase):
     '''
     @classmethod
     def setUpClass(cls):
+        requires('gui')
         cls.root = root = tk.Tk()
         PyShell.fix_x11_paste(root)
         cls.text = tk.Text(root)