MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / check_exists

Function check_exists

tests/conftest.py:46–62  ·  view source on GitHub ↗

Returns the absolute path to a (relative) path of a file that should exist within the tests/ directory. Throws FileNotFoundError if the file could not be found.

(path: ty.AnyStr)

Source from the content-addressed store, hash-verified

44
45
46def check_exists(path: ty.AnyStr) -> ty.AnyStr:
47 """Returns the absolute path to a (relative) path of a file that
48 should exist within the tests/ directory.
49
50 Throws FileNotFoundError if the file could not be found.
51 """
52 if not os.path.exists(path):
53 raise FileNotFoundError(
54 f"""
55Test video file ({path}) must be present to run test case. This file can be obtained by running the following commands from the root of the repository:
56
57git fetch --depth=1 https://github.com/Breakthrough/PySceneDetect.git refs/heads/resources:refs/remotes/origin/resources
58git checkout refs/remotes/origin/resources -- tests/resources/
59git reset
60"""
61 )
62 return path
63
64
65#

Callers 7

test_video_fileFunction · 0.85
test_movie_clipFunction · 0.85
test_vfr_videoFunction · 0.85
test_vfr_drop3_videoFunction · 0.85
corrupt_video_fileFunction · 0.85
rotated_video_fileFunction · 0.85
test_fades_clipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected