from DocTest.CompareImage import CompareImage
import pytest
from pathlib import Path
import numpy

def test_single_png(testdata_dir):
    img = CompareImage(testdata_dir / 'text_big.png')
    assert len(img.opencv_images)==1
    assert type(img.opencv_images)==list
    type(img.opencv_images[0])==numpy.ndarray

def test_single_pdf(testdata_dir):
    pass

def test_multipage_pdf(testdata_dir):
    pass

def test_huge_pdf(testdata_dir):
    pass

def test_image_text_content(testdata_dir):
    pass

def test_pdf_text_content(testdata_dir):
    pass

def test_non_existing_file(testdata_dir):
    with pytest.raises(AssertionError):
        img = CompareImage(testdata_dir / 'does_not_exist.png')
        
def test_corrupt_image(testdata_dir):
    with pytest.raises(AssertionError):
        img = CompareImage(testdata_dir / 'corrupt_image.png')

def test_corrupt_pdf(testdata_dir):
    with pytest.raises(AssertionError):
        img = CompareImage(testdata_dir / 'corrupt_pdf.pdf')

[((144, 187), 'DocTest.CompareImage.CompareImage', 'CompareImage', (["(testdata_dir / 'text_big.png')"], {}), "(testdata_dir / 'text_big.png')\n", (156, 187), False, 'from DocTest.CompareImage import CompareImage\n'), ((604, 633), 'pytest.raises', 'pytest.raises', (['AssertionError'], {}), '(AssertionError)\n', (617, 633), False, 'import pytest\n'), ((649, 698), 'DocTest.CompareImage.CompareImage', 'CompareImage', (["(testdata_dir / 'does_not_exist.png')"], {}), "(testdata_dir / 'does_not_exist.png')\n", (661, 698), False, 'from DocTest.CompareImage import CompareImage\n'), ((755, 784), 'pytest.raises', 'pytest.raises', (['AssertionError'], {}), '(AssertionError)\n', (768, 784), False, 'import pytest\n'), ((800, 848), 'DocTest.CompareImage.CompareImage', 'CompareImage', (["(testdata_dir / 'corrupt_image.png')"], {}), "(testdata_dir / 'corrupt_image.png')\n", (812, 848), False, 'from DocTest.CompareImage import CompareImage\n'), ((895, 924), 'pytest.raises', 'pytest.raises', (['AssertionError'], {}), '(AssertionError)\n', (908, 924), False, 'import pytest\n'), ((940, 986), 'DocTest.CompareImage.CompareImage', 'CompareImage', (["(testdata_dir / 'corrupt_pdf.pdf')"], {}), "(testdata_dir / 'corrupt_pdf.pdf')\n", (952, 986), False, 'from DocTest.CompareImage import CompareImage\n')]