polish: copy_blocks_css minors + record editor dual-source observation

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-10-22 17:58:05 +08:00
parent 960f7b1002
commit 702253f387
3 changed files with 6 additions and 5 deletions
+3 -3
View File
@@ -99,8 +99,8 @@ def test_theme_blocks_css_overrides_platform(tmp_path):
(theme_dir / 'blocks.css').write_text('/* theme version */', encoding='utf-8')
builder.copy_blocks_css(theme_dir, dist)
assert (dist / 'blocks.css').read_text(encoding='utf-8') == '/* theme version */'
# 无主题版时回落平台版
# 无主题版时回落平台版(精确断言内容一致)
dist2 = tmp_path / 'assets2'; dist2.mkdir()
builder.copy_blocks_css(tmp_path / 'nonexistent', dist2)
assert (dist2 / 'blocks.css').is_file()
assert (dist2 / 'blocks.css').read_text(encoding='utf-8') != '/* theme version */'
platform = (builder.ROOT / 'app' / 'static' / 'blocks.css').read_text(encoding='utf-8')
assert (dist2 / 'blocks.css').read_text(encoding='utf-8') == platform