Skip to content

Commit 91747de

Browse files
committed
tests
1 parent 87e1142 commit 91747de

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_widget.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,17 @@ class lowercaseWidget(Widget):
579579

580580

581581
def test_lazy_loading() -> None:
582+
"""Regression test for https://github.com/Textualize/textual/issues/5077
583+
584+
Check that the lazy loading magic doesn't break attribute access.
585+
586+
"""
587+
588+
with pytest.raises(ImportError):
589+
pass
590+
582591
from textual import widgets
592+
from textual.widgets import Label
583593

584594
assert not hasattr(widgets, "foo")
585595
assert not hasattr(widgets, "bar")

0 commit comments

Comments
 (0)