Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Oct 2, 2024
1 parent 87e1142 commit 91747de
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,17 @@ class lowercaseWidget(Widget):


def test_lazy_loading() -> None:
"""Regression test for https://github.com/Textualize/textual/issues/5077
Check that the lazy loading magic doesn't break attribute access.
"""

with pytest.raises(ImportError):
pass

from textual import widgets
from textual.widgets import Label

assert not hasattr(widgets, "foo")
assert not hasattr(widgets, "bar")
Expand Down

0 comments on commit 91747de

Please sign in to comment.