mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Adding tests for layout factory
This commit is contained in:
14
tests/layouts/test_factory.py
Normal file
14
tests/layouts/test_factory.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import pytest
|
||||
|
||||
from textual.layouts.dock import DockLayout
|
||||
from textual.layouts.factory import get_layout, MissingLayout
|
||||
|
||||
|
||||
def test_get_layout_valid_layout():
|
||||
layout_class = get_layout("dock")
|
||||
assert type(layout_class) is DockLayout
|
||||
|
||||
|
||||
def test_get_layout_invalid_layout():
|
||||
with pytest.raises(MissingLayout):
|
||||
get_layout("invalid")
|
||||
Reference in New Issue
Block a user