mirror of https://github.com/Textualize/rich.git
style and tools test fix
This commit is contained in:
parent
5861c21cf7
commit
2262069eef
|
@ -114,6 +114,15 @@ def test_add():
|
|||
assert Style().__add__("foo") == NotImplemented
|
||||
|
||||
|
||||
def test_iadd():
|
||||
style = Style(color="red")
|
||||
style += Style(bold=True)
|
||||
assert style == Style(color="red", bold=True)
|
||||
style += None
|
||||
assert style == Style(color="red", bold=True)
|
||||
assert style.__iadd__("foo") == NotImplemented
|
||||
|
||||
|
||||
def test_style_stack():
|
||||
stack = StyleStack(Style(color="red"))
|
||||
repr(stack)
|
||||
|
|
|
@ -34,3 +34,4 @@ def test_ratio_divide():
|
|||
assert ratio_divide(12, [1, 3]) == [3, 9]
|
||||
assert ratio_divide(0, [1, 3]) == [0, 0]
|
||||
assert ratio_divide(0, [1, 3], [1, 1]) == [1, 1]
|
||||
assert ratio_divide(10, [1, 0]) == [10, 0]
|
||||
|
|
Loading…
Reference in New Issue