Skip to content

Add tests for pretext build -g (force asset regeneration)#1125

Merged
oscarlevin merged 6 commits intomainfrom
copilot/add-pretext-build-g-to-tests
Mar 21, 2026
Merged

Add tests for pretext build -g (force asset regeneration)#1125
oscarlevin merged 6 commits intomainfrom
copilot/add-pretext-build-g-to-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 20, 2026

pretext build -g had no test coverage, which allowed a behavioral regression to ship in the 1.2 release undetected.

Changes

  • New test test_build_generate in tests/test_cli.py covering all documented behaviors of the generate/no-generate flags against the existing graphics example project (asymptote + prefigure assets):
    • build -q → assets skipped entirely
    • build -g → assets force-generated regardless of prior state; build output produced
    • build after build -g with source unchanged → hash matches, deleted asset stays missing (caching works)
    • build -g after hash is saved → still regenerates unconditionally
    • build -g -q together → warning emitted, flags cancel out, behaves like normal build

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • runestone.academy
    • Triggering command: /usr/bin/python3 python3 scripts/fetch_core.py (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Add pretext build -g to tests</issue_title>
<issue_description>No time to look into it now, but the behavior of this command must be different than what we are testing, since it caught us on the 1.2 release. See https://groups.google.com/g/pretext-dev/c/klKMunE1kAg</issue_description>

Comments on the Issue (you are @copilot in this section)

@oscarlevin Not sure the status of this, since the issue is very old. Check the generate documentation in docs to see expected behavior and write better tests.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add pretext build -g to tests

2 participants