fix: move local imports to global

This commit is contained in:
Shamil Abdulaev 2025-11-16 00:03:28 +03:00
parent 3ce95d376e
commit 545ba86ddc
No known key found for this signature in database
GPG key ID: F9F7726024C005E7

View file

@ -2,6 +2,8 @@
from idlelib import iomenu from idlelib import iomenu
import builtins import builtins
import os
import tempfile
import unittest import unittest
from test.support import requires from test.support import requires
from tkinter import Tk from tkinter import Tk
@ -60,9 +62,6 @@ def test_fixnewlines_end(self):
def test_reload_no_file(self): def test_reload_no_file(self):
# Test reload when no file is associated # Test reload when no file is associated
import tempfile
import os
from unittest.mock import Mock
io = self.io io = self.io
# Ensure no filename is set # Ensure no filename is set
@ -85,8 +84,6 @@ def mock_showinfo(*args, **kwargs):
def test_reload_with_file(self): def test_reload_with_file(self):
# Test reload with an actual file # Test reload with an actual file
import tempfile
import os
io = self.io io = self.io
text = io.editwin.text text = io.editwin.text
@ -114,8 +111,6 @@ def test_reload_with_file(self):
def test_reload_with_unsaved_changes_cancel(self): def test_reload_with_unsaved_changes_cancel(self):
# Test reload with unsaved changes and user cancels # Test reload with unsaved changes and user cancels
import tempfile
import os
io = self.io io = self.io
text = io.editwin.text text = io.editwin.text
@ -149,8 +144,6 @@ def test_reload_with_unsaved_changes_cancel(self):
def test_reload_with_unsaved_changes_confirm(self): def test_reload_with_unsaved_changes_confirm(self):
# Test reload with unsaved changes and user confirms # Test reload with unsaved changes and user confirms
import tempfile
import os
io = self.io io = self.io
text = io.editwin.text text = io.editwin.text