Skip to content

Commit a404ecb

Browse files
committed
new ci test routine
1 parent 847c5d7 commit a404ecb

File tree

2 files changed

+12
-23
lines changed

2 files changed

+12
-23
lines changed

.github/workflows/test_n_pub.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,23 @@ jobs:
4444

4545
- name: Setup Python dependencies
4646
run: |
47-
python -m pip install -U pip pytest pytest-github-actions-annotate-failures
47+
python -m pip install -U pip setuptools pytest pytest-github-actions-annotate-failures
4848
4949
- name: Install ffmpeg_downloader package
5050
run: pip install -q .
5151

52+
- name: Install ffmpeg
53+
run: ffdl install -y
54+
55+
- name: Install ffmpeg snapshot
56+
run: ffdl install -y -U snapshot
57+
5258
- name: Run tests
5359
run: pytest -vv
5460

61+
- name: Uninstall ffmpeg
62+
run: ffdl uninstall -y
63+
5564
distribute:
5665
name: Distribution
5766
runs-on: ubuntu-latest

tests/test_package.py

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,6 @@
1-
from os import path
2-
from shutil import which
31
import ffmpeg_downloader as ffdl
42

53

64
def test():
7-
def test_update():
8-
ffdl.update(skip_disclaimer=True)
9-
assert ffdl.has_update() is False
10-
assert which(ffdl.ffmpeg_path) is not None
11-
assert which(ffdl.ffprobe_path) is not None
12-
assert ffdl.ffmpeg_version is not None
13-
14-
def test_remove():
15-
ffdl.remove()
16-
assert ffdl.ffmpeg_path is None
17-
assert ffdl.ffprobe_path is None
18-
assert ffdl.ffmpeg_version is None
19-
assert ffdl.has_update()
20-
21-
if ffdl.ffmpeg_path is None:
22-
test_update()
23-
test_remove()
24-
else:
25-
test_remove()
26-
test_update()
5+
assert ffdl.installed('ffmpeg')
6+
assert ffdl.installed('ffprobe')

0 commit comments

Comments
 (0)