Esempio n. 1
0
def test_get_size_with_invalid_path(tmpdir):
    """Test reading out image size with a missing file"""

    test_image = 'missing-file.jpg'
    src_file = os.path.join(CURRENT_DIR, test_image)

    result = get_size(src_file)
    assert result is None
Esempio n. 2
0
def test_get_size_with_invalid_path(tmpdir):
    """Test reading out image size with a missing file"""

    test_image = 'missing-file.jpg'
    src_file = os.path.join(CURRENT_DIR, test_image)

    result = get_size(src_file)
    assert result is None
Esempio n. 3
0
def test_get_size(tmpdir):
    """Test reading out image size"""

    test_image = "flickr_jerquiaga_2394751088_cc-by-nc.jpg"
    src_file = os.path.join(CURRENT_DIR, "sample", "pictures", "dir1", "test1", test_image)

    result = get_size(src_file)
    assert result == {"height": 800, "width": 600}
Esempio n. 4
0
def test_get_size(tmpdir):
    """Test reading out image size"""

    test_image = 'flickr_jerquiaga_2394751088_cc-by-nc.jpg'
    src_file = os.path.join(CURRENT_DIR, 'sample', 'pictures', 'dir1', 'test1',
                            test_image)

    result = get_size(src_file)
    assert result == {'height': 800, 'width': 600}
Esempio n. 5
0
def test_get_size(tmpdir):
    """Test reading out image size"""

    test_image = 'flickr_jerquiaga_2394751088_cc-by-nc.jpg'
    src_file = os.path.join(CURRENT_DIR, 'sample', 'pictures', 'dir1', 'test1',
                            test_image)

    result = get_size(src_file)
    assert result == {'height': 800, 'width': 600}