Skip to content

Commit

Permalink
test: ✅ update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dubusster committed Mar 11, 2024
1 parent da5b5cc commit c417c62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/python/test_IRMovie.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from pathlib import Path
import random
from typing import Dict
from librir.video_io.rir_video_io import FileFormat
from librir.video_io.utils import is_ir_file_corrupted, split_rush

import numpy as np
import numpy.testing as npt
import pytest
from librir import IRMovie
from librir.video_io.IRMovie import CalibrationNotFound
from librir.video_io.rir_video_io import FILE_FORMAT_H264


@pytest.mark.instantiation
Expand Down Expand Up @@ -152,7 +152,7 @@ def test_close(array):


def test_video_file_format(movie: IRMovie):
assert movie.video_file_format == FILE_FORMAT_H264
assert movie.video_file_format == FileFormat.H264.value


def test_split_rush(movie: IRMovie):
Expand Down
7 changes: 3 additions & 4 deletions tests/python/test_video_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
import pytest
from librir.video_io import IRMovie, IRSaver
from librir.video_io.rir_video_io import (
FILE_FORMAT_H264,
FILE_FORMAT_PCR,
FileFormat,
camera_saturate,
correct_PCR_file,
get_emissivity,
Expand Down Expand Up @@ -141,15 +140,15 @@ def test_correct_PCR_file(pcr_filename, images):
data = np.array(images, dtype=np.uint16)
correct_PCR_file(pcr_filename, data.shape[0], data.shape[1], 50)
with IRMovie.from_filename(pcr_filename) as mov:
assert mov.video_file_format == FILE_FORMAT_PCR
assert mov.video_file_format == FileFormat.PCR.value


def test_pcr2h264(pcr_filename):
with IRMovie.from_filename(pcr_filename) as mov:
res = mov.pcr2h264()

with IRMovie.from_filename(res) as mov:
assert mov.video_file_format == FILE_FORMAT_H264
assert mov.video_file_format == FileFormat.H264.value


def test_get_emissivity(movie: IRMovie):
Expand Down

0 comments on commit c417c62

Please sign in to comment.