mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-11-04 23:47:56 +02:00
move import statements in integration test to top
This commit is contained in:
1 parent
148322cfb7
commit
a81f69280f
1 file changed
+2
-5
@@ -11,17 +11,14 @@ import sys
|
|||||||
import shutil
|
import shutil
|
||||||
import time
|
import time
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from src.downloader import PlaylistDownloader
|
||||||
|
from tests.dummy_config import DummyConfig
|
||||||
# Make imports robust when running the script directly from different working directories.
|
# Make imports robust when running the script directly from different working directories.
|
||||||
# Ensure the repository root is on sys.path so the script can import `src`.
|
# Ensure the repository root is on sys.path so the script can import `src`.
|
||||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||||
if str(REPO_ROOT) not in sys.path:
|
if str(REPO_ROOT) not in sys.path:
|
||||||
sys.path.insert(0, str(REPO_ROOT))
|
sys.path.insert(0, str(REPO_ROOT))
|
||||||
|
|
||||||
#import from src and tests
|
|
||||||
from src.downloader import PlaylistDownloader
|
|
||||||
from tests.dummy_config import DummyConfig
|
|
||||||
|
|
||||||
if not os.getenv("INTEGRATION_TEST"):
|
if not os.getenv("INTEGRATION_TEST"):
|
||||||
print("Skipping full integration test (set INTEGRATION_TEST=1 to enable)")
|
print("Skipping full integration test (set INTEGRATION_TEST=1 to enable)")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|||||||
Reference in new issue
Block a user