Skip to content

Commit

Permalink
Added prints to test_load_video
Browse files Browse the repository at this point in the history
  • Loading branch information
fedesemeraro committed Mar 11, 2024
1 parent 61d7f50 commit 23c7049
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-arcjetCV.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ jobs:
conda init bash
source ~/.bashrc
conda activate arcjetCV
pytest
pytest -s
9 changes: 8 additions & 1 deletion tests/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from PySide6.QtWidgets import QApplication
from PySide6.QtCore import Qt
from pathlib import Path
import os


def find_test_video_path():
Expand Down Expand Up @@ -49,8 +50,14 @@ def test_main_window_initialization(app):

def test_load_video(app, qtbot, mocker):
expected_video_path = find_test_video_path()
print(expected_video_path)
print("ciao", expected_video_path)
mocker.patch("PySide6.QtWidgets.QFileDialog.getOpenFileName", return_value=(expected_video_path, ""))

folder = os.path.dirname(expected_video_path)
for entry in os.listdir(folder):
full_path = os.path.join(folder, entry)
if os.path.isfile(full_path):
print(entry)

qtbot.mouseClick(app.ui.pushButton_loadVideo, Qt.LeftButton)

Expand Down

0 comments on commit 23c7049

Please sign in to comment.