1
0
mirror of https://github.com/darkzoul5/YoutubePlaylistSync.git synced 2026-07-03 04:23:59 +03:00

Update integration workflow to support 'Next' branch and enhance import robustness in tests

This commit is contained in:
2025-10-25 20:29:27 +03:00
parent 07c4533cba
commit 75c8993bb4
2 changed files with 12 additions and 2 deletions
+10
View File
@@ -14,6 +14,16 @@ from pathlib import Path
import time
import shutil
# Make imports robust when running the script directly from different working directories.
# Ensure the repository root and this tests folder are on sys.path so the script can import
# both the package (`ytplaylist`) and local test helpers (`tests.temp_config`).
REPO_ROOT = Path(__file__).resolve().parents[1]
TESTS_DIR = Path(__file__).resolve().parent
if str(REPO_ROOT) not in sys.path:
sys.path.insert(0, str(REPO_ROOT))
if str(TESTS_DIR) not in sys.path:
sys.path.insert(0, str(TESTS_DIR))
if not os.getenv("INTEGRATION_TEST"):
print("Skipping full integration test (set INTEGRATION_TEST=1 to enable)")
sys.exit(0)