Add test suite (45 tests) + GitHub Actions CI - #14
Merged
Conversation
- tests/test_tradutor.py: TagProtector round-trip, SmartGlossary preserve logic (flags, categories, modes, exact/contains matching), split_batch, blacklist loading, atomic_save - tests/test_diff_tool.py: detect_update, audit_translation, smart_diff - tests/test_merge.py: merge+backup, validator guard, dry-run - tests/test_glossary_wiki.py: GlossaryEntry round-trip, load/save, wiki dataset integrity (16 categories / 2,694 terms) - CI: ubuntu+windows x Python 3.10/3.12, compileall syntax gate + unittest; stdlib-only test deps (openai+tqdm for imports) - README: CI badge + Development section
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 3 foundation: tests + CI
The project had zero tests — every change (like the 4 PRs we just merged) was verified by hand. This adds the safety net.
Test suite — 45 tests, stdlib
unittestonly (no pytest needed)tests/test_tradutor.pyTagProtectorprotect/restore round-trip (game markup{g|…},<color>,<sprite>,<link>),SmartGlossarypreserve logic (flags, categories, complete vs preserve mode, exact/contains matching),split_batchtoken cap, blacklist loading,atomic_savetests/test_diff_tool.pydetect_updatepatch deltas,audit_translationuntranslated detection,smart_difftests/test_merge.pytests/test_glossary_wiki.pyGlossaryEntryround-trip, load/save, wiki dataset integrity (16 categories / 2,694 terms)python -m unittest discover -s tests -v— currently 45/45 green ✅CI —
.github/workflows/tests.ymlmaincompileallsyntax gate → unittestREADME
CI badge + Development section with test instructions.
Notes
tradutor_desktop.py) intentionally not in CI scope (PySide6 excluded); core engine is fully covered.After merge, every future PR gets an automatic green/red check.