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

Function test_from_file

tests/test_theme.py:23–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21
22
23def test_from_file():
24 theme = Theme({"warning": "red"})
25 text_file = io.StringIO()
26 text_file.write(theme.config)
27 text_file.seek(0)
28
29 load_theme = Theme.from_file(text_file)
30 assert theme.styles == load_theme.styles
31
32
33def test_read():

Callers

nothing calls this directly

Calls 4

ThemeClass · 0.90
from_fileMethod · 0.80
writeMethod · 0.45
seekMethod · 0.45

Tested by

no test coverage detected