songs-import: Option --repo (Ordner mit charts/ und songs/ angeben)

Nötig, wenn das Skript aus einem Worktree läuft, die Songs aber im Hauptordner liegen.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-01 13:13:51 +01:00
parent da22c8b136
commit 27a4885b22
2 changed files with 8 additions and 2 deletions

View File

@ -86,6 +86,11 @@ class SongsImport(unittest.TestCase):
self.assertTrue(any("WARNUNG" in l and "anders.mp3" in l for l in self.lines))
self.assertTrue((self.data / "songs" / "alpha").is_dir(), "die übrigen Songs gehen trotzdem")
def test_repo_option_selects_another_folder_with_charts_and_songs(self):
make_repo(self.repo)
self.assertEqual(si.main(["x", "--repo", str(self.repo), "--data-dir", str(self.data)]), 0)
self.assertTrue((self.data / "charts" / "alpha.toml").is_file())
def test_dry_run_changes_nothing(self):
make_repo(self.repo)
self.run_import(dry=True)