Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions tests/test_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ class TestCompatFunctions(unittest.TestCase):
@patch("python_logo_widgets._compat.tk.Tk")
def test_logo_widget(self, mock_tk, mock_cls):
"""Test the logo compatibility wrapper."""
from python_logo_widgets._compat import (
from python_logo_widgets._compat import ( # pylint: disable=import-outside-toplevel
logo_widget,
) # pylint: disable=import-outside-toplevel
)

mock_root = MagicMock()
mock_tk.return_value = mock_root
Expand All @@ -26,9 +26,9 @@ def test_logo_widget(self, mock_tk, mock_cls):
@patch("python_logo_widgets._compat.tk.Tk")
def test_length_widget(self, mock_tk, mock_cls):
"""Test the length compatibility wrapper."""
from python_logo_widgets._compat import (
from python_logo_widgets._compat import ( # pylint: disable=import-outside-toplevel
length_widget,
) # pylint: disable=import-outside-toplevel
)

mock_root = MagicMock()
mock_tk.return_value = mock_root
Expand All @@ -41,9 +41,9 @@ def test_length_widget(self, mock_tk, mock_cls):
@patch("python_logo_widgets._compat.tk.Tk")
def test_width_widget(self, mock_tk, mock_cls):
"""Test the width compatibility wrapper."""
from python_logo_widgets._compat import (
from python_logo_widgets._compat import ( # pylint: disable=import-outside-toplevel
width_widget,
) # pylint: disable=import-outside-toplevel
)

mock_root = MagicMock()
mock_tk.return_value = mock_root
Expand All @@ -64,9 +64,9 @@ def test_demo_creates_all_widgets(
self, mock_tk, mock_logo, mock_length, mock_width
):
"""Test the demo launcher creates all widgets."""
from python_logo_widgets._demo import (
from python_logo_widgets._demo import ( # pylint: disable=import-outside-toplevel
demo,
) # pylint: disable=import-outside-toplevel
)

mock_root = MagicMock()
mock_tk.return_value = mock_root
Expand Down
16 changes: 8 additions & 8 deletions tests/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class TestLogoWidget(unittest.TestCase):
@patch("python_logo_widgets.widgets._load_image", return_value="fake.gif")
def test_creates_with_parent(self, mock_load, mock_photo, _mock_label):
"""Test widget creation with a parent."""
from python_logo_widgets import (
from python_logo_widgets import ( # pylint: disable=import-outside-toplevel
LogoWidget,
) # pylint: disable=import-outside-toplevel
)

parent = MagicMock()
widget = LogoWidget(parent)
Expand All @@ -27,9 +27,9 @@ def test_creates_with_parent(self, mock_load, mock_photo, _mock_label):
@patch("python_logo_widgets.widgets._load_image", return_value="fake.gif")
def test_custom_bg(self, _mock_load, _mock_photo, mock_label):
"""Test custom background propagation."""
from python_logo_widgets import (
from python_logo_widgets import ( # pylint: disable=import-outside-toplevel
LogoWidget,
) # pylint: disable=import-outside-toplevel
)

parent = MagicMock()
LogoWidget(parent, bg="white")
Expand All @@ -46,9 +46,9 @@ class TestPoweredByLengthWidget(unittest.TestCase):
@patch("python_logo_widgets.widgets._load_image", return_value="fake.gif")
def test_creates_with_parent(self, mock_load, _mock_photo, _mock_label):
"""Test powered-by-length widget creation with a parent."""
from python_logo_widgets import (
from python_logo_widgets import ( # pylint: disable=import-outside-toplevel
PoweredByLengthWidget,
) # pylint: disable=import-outside-toplevel
)

parent = MagicMock()
widget = PoweredByLengthWidget(parent)
Expand All @@ -64,9 +64,9 @@ class TestPoweredByWidthWidget(unittest.TestCase):
@patch("python_logo_widgets.widgets._load_image", return_value="fake.gif")
def test_creates_with_parent(self, mock_load, _mock_photo, _mock_label):
"""Test powered-by-width widget creation with a parent."""
from python_logo_widgets import (
from python_logo_widgets import ( # pylint: disable=import-outside-toplevel
PoweredByWidthWidget,
) # pylint: disable=import-outside-toplevel
)

parent = MagicMock()
widget = PoweredByWidthWidget(parent)
Expand Down