Skip to content

Commit

Permalink
Update test scripts and workflow
Browse files Browse the repository at this point in the history
This commit updates the test scripts and workflow by removing the installation of xvfb and updating the pytest command in the workflow file.
  • Loading branch information
Timozen committed Jan 22, 2024
1 parent e084200 commit 0373f65
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 18 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/coding_lib_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ jobs:

- name: Install dependencies
run: |
sudo apt install xvfb
sudo apt install build-essential libdbus-glib-1-dev libgirepository1.0-dev
python -m pip install --upgrade pip
pip install pytest pytest-cov xvfbwrapper
pip install .
- name: Test with pytest
run: |
xvfb-run pytest -rA -vv -W ignore::DeprecationWarning --cov=jefapato --cov-report term-missing
pytest -rA -vv -W ignore::DeprecationWarning --cov=jefapato --cov-report term-missing tests/test_blinking.py tests/test_earfeature.py
4 changes: 0 additions & 4 deletions tests/test_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

from jefapato import facial_features

from xvfbwrapper import Xvfb # for headless rendering
vdisplay = Xvfb(width=512, height=512)
vdisplay.start()

def get_test_video_path() -> Path:
return Path(__file__).parent / "files/test_10sec.mp4"

Expand Down
4 changes: 0 additions & 4 deletions tests/test_blinking.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@

from jefapato import blinking

from xvfbwrapper import Xvfb # for headless rendering
vdisplay = Xvfb(width=512, height=512)
vdisplay.start()

def get_file_short():
return Path(__file__).parent / "files" / "blinking" / "blinking_short.csv"

Expand Down
4 changes: 0 additions & 4 deletions tests/test_earfeature.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

from jefapato.facial_features import features

from xvfbwrapper import Xvfb # for headless rendering
vdisplay = Xvfb(width=512, height=512)
vdisplay.start()

def test_ear_score_inputs():
# Test case 1: Invalid input types
input_data = [1, 2, 3, 4, 5]
Expand Down
4 changes: 0 additions & 4 deletions tests/test_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
from jefapato.facial_features import mediapipe_landmark_extractor
from jefapato.facial_features import video_data_loader

from xvfbwrapper import Xvfb # for headless rendering
vdisplay = Xvfb(width=512, height=512)
vdisplay.start()

class ExtractorHook:
def __init__(self) -> None:
self.triggered_handle_update = False
Expand Down

0 comments on commit 0373f65

Please sign in to comment.