Skip to content

Commit 545ba86

Browse files
committed
fix: move local imports to global
1 parent 3ce95d3 commit 545ba86

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

Lib/idlelib/idle_test/test_iomenu.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from idlelib import iomenu
44
import builtins
5+
import os
6+
import tempfile
57
import unittest
68
from test.support import requires
79
from tkinter import Tk
@@ -60,9 +62,6 @@ def test_fixnewlines_end(self):
6062

6163
def test_reload_no_file(self):
6264
# Test reload when no file is associated
63-
import tempfile
64-
import os
65-
from unittest.mock import Mock
6665

6766
io = self.io
6867
# Ensure no filename is set
@@ -85,8 +84,6 @@ def mock_showinfo(*args, **kwargs):
8584

8685
def test_reload_with_file(self):
8786
# Test reload with an actual file
88-
import tempfile
89-
import os
9087

9188
io = self.io
9289
text = io.editwin.text
@@ -114,8 +111,6 @@ def test_reload_with_file(self):
114111

115112
def test_reload_with_unsaved_changes_cancel(self):
116113
# Test reload with unsaved changes and user cancels
117-
import tempfile
118-
import os
119114

120115
io = self.io
121116
text = io.editwin.text
@@ -149,8 +144,6 @@ def test_reload_with_unsaved_changes_cancel(self):
149144

150145
def test_reload_with_unsaved_changes_confirm(self):
151146
# Test reload with unsaved changes and user confirms
152-
import tempfile
153-
import os
154147

155148
io = self.io
156149
text = io.editwin.text

0 commit comments

Comments
 (0)