mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-24 18:05:07 +00:00
test(core): skip download integration tests when ffprobe is absent
This commit is contained in:
@@ -14,6 +14,7 @@ localhost server, asserting that:
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import shutil
|
||||||
import threading
|
import threading
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
|
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
|
||||||
@@ -24,6 +25,8 @@ from unshackle.core.constants import DOWNLOAD_CANCELLED
|
|||||||
from unshackle.core.manifests import DASH
|
from unshackle.core.manifests import DASH
|
||||||
from unshackle.core.tracks.track import DownloadContext
|
from unshackle.core.tracks.track import DownloadContext
|
||||||
|
|
||||||
|
pytestmark = pytest.mark.skipif(shutil.which("ffprobe") is None, reason="requires ffprobe")
|
||||||
|
|
||||||
# distinctive parent resource for the collapse case; init is its [0, INIT_LEN) prefix
|
# distinctive parent resource for the collapse case; init is its [0, INIT_LEN) prefix
|
||||||
PARENT = bytes(i % 256 for i in range(10240))
|
PARENT = bytes(i % 256 for i in range(10240))
|
||||||
INIT_LEN = 512
|
INIT_LEN = 512
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ asserts the stale directory is wiped rather than mixed into the new download.
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import importlib
|
import importlib
|
||||||
|
import shutil
|
||||||
import threading
|
import threading
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
|
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
|
||||||
@@ -22,6 +23,8 @@ from unshackle.core.manifests import DASH
|
|||||||
from unshackle.core.tracks import resume
|
from unshackle.core.tracks import resume
|
||||||
from unshackle.core.tracks.track import DownloadContext
|
from unshackle.core.tracks.track import DownloadContext
|
||||||
|
|
||||||
|
pytestmark = pytest.mark.skipif(shutil.which("ffprobe") is None, reason="requires ffprobe")
|
||||||
|
|
||||||
INIT = bytes(range(100))
|
INIT = bytes(range(100))
|
||||||
PART0 = bytes([0xA0]) * 300
|
PART0 = bytes([0xA0]) * 300
|
||||||
PART1 = bytes([0xB1]) * 200
|
PART1 = bytes([0xB1]) * 200
|
||||||
|
|||||||
Reference in New Issue
Block a user