Unit test for video ratio scaling

This commit is contained in:
Alexandru Pisarenco
2021-01-09 03:06:25 +01:00
parent fb4473a1a8
commit 728e5d2834
2 changed files with 17 additions and 0 deletions

0
test/__init__.py Normal file
View File

17
test/test_aspect.py Normal file
View File

@@ -0,0 +1,17 @@
from minfo import MediaInfo, Ratio, Resolution
def test_square_source():
info = MediaInfo()
info.general = {
}
info.video = {
"Width": 576,
"Height": 576,
"DisplayAspectRatio": 1.778
}
info.determine_aspect_properties()
assert info.resolution == Resolution(576, 576)
assert info.pixel_aspect_ratio == Ratio(16, 9)