mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
16 lines
461 B
Python
16 lines
461 B
Python
import pytest
|
|
|
|
from textual.widgets import Placeholder
|
|
from textual.widgets._placeholder import InvalidPlaceholderVariant
|
|
|
|
|
|
def test_invalid_placeholder_variant():
|
|
with pytest.raises(InvalidPlaceholderVariant):
|
|
Placeholder(variant="this is clearly not a valid variant!")
|
|
|
|
|
|
def test_invalid_reactive_variant_change():
|
|
p = Placeholder()
|
|
with pytest.raises(InvalidPlaceholderVariant):
|
|
p.variant = "this is clearly not a valid variant!"
|