Skip to content

Commit 2322456

Browse files
Copilotoscarlevin
andcommitted
Rebase on main, run black formatting, add CHANGELOG entry
- Rebased on origin/main (includes new tests and changes from #1124-#1128) - Ran `poetry run black .` for formatting (reformatted test_generate.py) - Added Fixed entry in CHANGELOG.md under [Unreleased] Co-authored-by: oscarlevin <6504596+oscarlevin@users.noreply.github.com> Agent-Logs-Url: https://github.com/PreTeXtBook/pretext-cli/sessions/72d5b309-fec0-4dad-8af0-1cbe035c2679
1 parent 2dfc096 commit 2322456

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ Instructions: Add a subsection under `[Unreleased]` for additions, fixes, change
99

1010
## [Unreleased]
1111

12+
### Fixed
13+
14+
- Failed individual asset generation (when core does not produce the expected output file) now raises an error and is no longer silently treated as a success. This prevents incorrectly caching incomplete asset generation results.
15+
1216
### Changed
1317

1418
- The default Asymptote generation method is now `local` (using the local `asy` binary) instead of `server`. This improves reliability since the server method has been subject to breakage whenever the Asymptote web interface is updated. Users who need the server method can still opt in via `asy-method="server"` in `project.ptx`.

tests/test_generate.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
individual_* functions in pretext/project/generate.py should raise an
66
exception so that the asset type is not added to the generated asset cache.
77
"""
8+
89
from pathlib import Path
910
from unittest.mock import patch
1011

@@ -49,7 +50,9 @@ def test_individual_latex_image_succeeds_when_output_exists(tmp_path: Path) -> N
4950
dest_dir = tmp_path / "dest"
5051
dest_dir.mkdir()
5152

52-
def fake_conversion(latex_image: str, outformat: str, dest_dir: Path, method: str) -> None:
53+
def fake_conversion(
54+
latex_image: str, outformat: str, dest_dir: Path, method: str
55+
) -> None:
5356
# Simulate a successful conversion by creating the expected output file.
5457
(dest_dir / Path(latex_image).with_suffix(".svg").name).touch()
5558

0 commit comments

Comments
 (0)