Skip to content

Commit

Permalink
Added print for loaded video
Browse files Browse the repository at this point in the history
  • Loading branch information
fedesemeraro committed Mar 11, 2024
1 parent b75ff1a commit 6d034a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions arcjetCV/utils/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def __init__(self, path):
self.shape = np.shape(frame)
self.h, self.w, self.chan = self.shape
self.last_frame = frame
print(f'Loaded {self.fpath} with {self.nframes} frames and shape {self.shape}')

if self.chan not in [1, 3]:
raise IndexError("ERROR: number of channels of input video (%i) is not 1 or 3!" % self.chan)
Expand Down
12 changes: 6 additions & 6 deletions tests/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ def test_main_window_initialization(app):

def test_load_video(app, qtbot, mocker):
expected_video_path = find_test_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)
# print("ciao", 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 6d034a2

Please sign in to comment.