mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add Styles.reset method revert internal attributes to None
This commit is contained in:
11
tests/test_styles.py
Normal file
11
tests/test_styles.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from rich.style import Style
|
||||
|
||||
from textual.css.styles import Styles
|
||||
|
||||
|
||||
def test_styles_reset():
|
||||
styles = Styles()
|
||||
styles.text_style = "not bold"
|
||||
assert styles.text_style == Style(bold=False)
|
||||
styles.reset()
|
||||
assert styles.text_style is Style.null()
|
||||
Reference in New Issue
Block a user