mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-07-03 04:23:59 +03:00
Refactor integration test setup and add pyproject.toml for project configuration
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=61.0", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "yt-playlist-downloader"
|
||||
version = "0.0.0"
|
||||
description = "YouTube playlist downloader"
|
||||
readme = "README.md"
|
||||
authors = [ { name = "Dark_Zoul" } ]
|
||||
license = { file = "LICENSE" }
|
||||
keywords = ["youtube", "yt-dlp", "playlist", "downloader"]
|
||||
|
||||
[project.urls]
|
||||
"Home" = "https://example.org/"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["."]
|
||||
include = ["ytplaylist*"]
|
||||
@@ -13,6 +13,7 @@ if not os.getenv("INTEGRATION_TEST"):
|
||||
sys.exit(0)
|
||||
|
||||
from ytplaylist.downloader import PlaylistDownloader
|
||||
from tests.temp_config import TempConfig
|
||||
|
||||
logging.basicConfig(level=logging.INFO, format='%(levelname)s:%(message)s')
|
||||
|
||||
@@ -21,16 +22,6 @@ if not playlist_url:
|
||||
print("Please set TEST_PLAYLIST_URL to a public YouTube playlist URL for integration testing")
|
||||
sys.exit(1)
|
||||
|
||||
# build a small temporary config-like object
|
||||
class TempConfig:
|
||||
yt_dlp_path = os.getenv("YTDLP_PATH", "yt-dlp")
|
||||
ffmpeg_path = os.getenv("FFMPEG_PATH", "ffmpeg")
|
||||
aria2c_path = os.getenv("ARIA2C_PATH", "aria2c")
|
||||
max_parallel_downloads = 2
|
||||
aria2c_connections = 2
|
||||
download_mode = "audio"
|
||||
max_video_quality = "1080p"
|
||||
|
||||
cfg = TempConfig()
|
||||
pl = {"url": playlist_url, "save_path": "./tmp_integration", "archive": "archive.txt"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user