diff --git a/tests/test_style.py b/tests/test_style.py index e1564050..e85ffcd4 100644 --- a/tests/test_style.py +++ b/tests/test_style.py @@ -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) diff --git a/tests/test_tools.py b/tests/test_tools.py index d860ea76..ba6bb810 100644 --- a/tests/test_tools.py +++ b/tests/test_tools.py @@ -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]