From 23c7049b80d75a4f04598d11baed291e8b649928 Mon Sep 17 00:00:00 2001 From: fsemerar Date: Mon, 11 Mar 2024 11:03:15 -0700 Subject: [PATCH] Added prints to test_load_video --- .github/workflows/test-arcjetCV.yml | 2 +- tests/test_gui.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-arcjetCV.yml b/.github/workflows/test-arcjetCV.yml index 90272ec..dc2fad0 100644 --- a/.github/workflows/test-arcjetCV.yml +++ b/.github/workflows/test-arcjetCV.yml @@ -44,4 +44,4 @@ jobs: conda init bash source ~/.bashrc conda activate arcjetCV - pytest + pytest -s diff --git a/tests/test_gui.py b/tests/test_gui.py index 1175e0b..87eb280 100644 --- a/tests/test_gui.py +++ b/tests/test_gui.py @@ -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(): @@ -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)