diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 13:45:25 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | a2e466a874502b665807f620eb8edefb37be1e8c (patch) | |
| tree | 25aa244348932914e3a112c76652176da2e364a4 /test/fs.py | |
| parent | a945c035ce9e3d5fda81a05f95f3ea1788a19ece (diff) | |
| download | pardes-a2e466a874502b665807f620eb8edefb37be1e8c.tar.gz pardes-a2e466a874502b665807f620eb8edefb37be1e8c.zip | |
A ThemeFile that cannot be read or is no theme fails its write, and a bad path says why
The theme is read when the host performs the request, after the write had been answered, so a missing file or a bad theme only showed a message; and a path not ending .zon said only invalid theme path. Load failures are now the waiting write's (late, as a Save's), and the path refusal says a theme file is a .zon.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/fs.py')
| -rw-r--r-- | test/fs.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -836,6 +836,15 @@ def odd_paths(binary): pass assert client.read('/index'), (where, line) client.write('/ctl', b'DumpDir\n') + # A theme file that is not there, or no theme, fails the write. + (root / 'bad.zon').write_bytes(b'.{ .nonsense = 1 }') + for line, why in ((f'ThemeFile {root}/missing.zon', 'theme file'), (f'ThemeFile {root}/bad.zon', 'theme file'), + ('ThemeFile notes.txt', 'a theme file is a .zon')): + try: + client.write('/ctl', (line + '\n').encode()) + raise AssertionError(f'{line} was taken') + except OSError as refused: + assert why in str(refused), (line, refused) def cut_writes(binary): |
