[PR #48] [MERGED] test: cover backup diff and restore round trip #80

Closed
opened 2026-10-15 20:53:16 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rehan-remade/universal-modder/pull/48
Author: @MarteTROLLL
Created: 10/4/2026
Status: ✅ Merged
Merged: 10/5/2026
Merged by: @rehan-remade

Base: main ← Head: test/backup-diff-restore


📝 Commits (1)

  • e43f960 test: cover backup diff and restore round trip

📊 Changes

1 file changed (+21 additions, -0 deletions)

View changed files

📝 tests/test_um.py (+21 -0)

📄 Description

Summary

um backup diff and um backup restore had no tests (only create was covered, by the pre-1980 timestamp test). This adds one offline test for the round trip:

  • diff reports a changed, a removed and an added file correctly
  • restore without --yes exits and leaves the folder untouched
  • restore --clean --yes puts back the snapshot contents, deletes the file added since, and keeps a <name>-pre-restore snapshot

Test-only change; no code in um/ is touched.

Test plan

  • uv run --with pytest pytest -q tests → 29 passed (Windows 11, Python 3.12)

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rehan-remade/universal-modder/pull/48 **Author:** [@MarteTROLLL](https://github.com/MarteTROLLL) **Created:** 10/4/2026 **Status:** ✅ Merged **Merged:** 10/5/2026 **Merged by:** [@rehan-remade](https://github.com/rehan-remade) **Base:** `main` ← **Head:** `test/backup-diff-restore` --- ### 📝 Commits (1) - [`e43f960`](https://github.com/rehan-remade/universal-modder/commit/e43f960d4ee5098d0d76cf968a3b320b641d24a3) test: cover backup diff and restore round trip ### 📊 Changes **1 file changed** (+21 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_um.py` (+21 -0) </details> ### 📄 Description ## Summary `um backup diff` and `um backup restore` had no tests (only `create` was covered, by the pre-1980 timestamp test). This adds one offline test for the round trip: - `diff` reports a changed, a removed and an added file correctly - `restore` without `--yes` exits and leaves the folder untouched - `restore --clean --yes` puts back the snapshot contents, deletes the file added since, and keeps a `<name>-pre-restore` snapshot Test-only change; no code in `um/` is touched. ## Test plan - [x] `uv run --with pytest pytest -q tests` → 29 passed (Windows 11, Python 3.12) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 20:53:16 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rehan-remade/universal-modder#80
No description provided.