mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add some initial rules to a "mega stylesheet"
The start of what will hopefully become a one-stop comprehensive test of all the fun corners of stylesheet parsing. While not intended to replace all the other unit tests for CSS, this test should help to quickly and easily be sure that nothing breaks any valid CSS. Influenced by #1253 and #1836 this code starts the process of implementing the requirement outlined in #1838. Adding more rules -- simple and/or weird -- that are expected and known to parse without a problem is encouraged.
This commit is contained in:
11
tests/css/test_mega_stylesheet.py
Normal file
11
tests/css/test_mega_stylesheet.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from pathlib import Path
|
||||
|
||||
from textual.css.stylesheet import Stylesheet
|
||||
|
||||
|
||||
def test_mega_stylesheet() -> None:
|
||||
"""It should be possible to load a known-good stylesheet."""
|
||||
mega_stylesheet = Stylesheet()
|
||||
mega_stylesheet.read(Path(__file__).parent / "test_mega_stylesheet.css")
|
||||
mega_stylesheet.parse()
|
||||
assert ".---we-made-it-to-the-end---" in mega_stylesheet.css
|
||||
Reference in New Issue
Block a user