MCPcopy
hub / github.com/Textualize/rich / test_read

Function test_read

tests/test_theme.py:33–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31
32
33def test_read():
34 theme = Theme({"warning": "red"})
35 with tempfile.TemporaryDirectory("richtheme") as name:
36 filename = os.path.join(name, "theme.cfg")
37 with open(filename, "wt") as write_theme:
38 write_theme.write(theme.config)
39 load_theme = Theme.read(filename)
40 assert theme.styles == load_theme.styles
41
42
43def test_theme_stack():

Callers

nothing calls this directly

Calls 5

ThemeClass · 0.90
openFunction · 0.85
joinMethod · 0.80
writeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected