eynollah/tests/test_dpi.py

14 lines
326 B
Python
Raw Normal View History

import cv2
from pathlib import Path
2024-02-23 20:18:38 +01:00
from eynollah.eynollah.utils.pil_cv2 import check_dpi
from tests.base import main
2024-02-23 22:44:27 +01:00
def test_dpi():
fpath = str(Path(__file__).parent.joinpath('resources', 'kant_aufklaerung_1784_0020.tif'))
assert 230 == check_dpi(cv2.imread(fpath))
2024-02-23 22:44:27 +01:00
if __name__ == '__main__':
main(__file__)