mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Spacing tests
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#uber1 {
|
||||
layout: vertical;
|
||||
background: dark_green;
|
||||
overflow: hidden auto;
|
||||
overflow-x: x;
|
||||
border: heavy white;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@ import rich.repr
|
||||
from ._error_tools import friendly_list
|
||||
from ._help_renderables import HelpText
|
||||
from ._help_text import (
|
||||
spacing_invalid_value,
|
||||
spacing_wrong_number_of_values,
|
||||
scalar_help_text,
|
||||
spacing_invalid_value,
|
||||
string_enum_help_text,
|
||||
color_property_help_text,
|
||||
string_enum_help_text,
|
||||
border_property_help_text,
|
||||
layout_property_help_text,
|
||||
docks_property_help_text,
|
||||
|
||||
@@ -324,6 +324,12 @@ def test_spacing_sub():
|
||||
Spacing(1, 2, 3, 4) - "foo"
|
||||
|
||||
|
||||
def test_spacing_convenience_constructors():
|
||||
assert Spacing.vertical(2) == Spacing(2, 0, 2, 0)
|
||||
assert Spacing.horizontal(2) == Spacing(0, 2, 0, 2)
|
||||
assert Spacing.all(2) == Spacing(2, 2, 2, 2)
|
||||
|
||||
|
||||
def test_split():
|
||||
assert Region(10, 5, 22, 15).split(10, 5) == (
|
||||
Region(10, 5, 10, 5),
|
||||
|
||||
Reference in New Issue
Block a user