コード例 #1
0
ファイル: test_autocrop.py プロジェクト: yintianjun/autocrop
def test_crop_noise_returns_none():
    loc = 'tests/data/noise.png'
    noise = cv2.imread(loc)
    assert crop(noise) is None
コード例 #2
0
ファイル: test_autocrop.py プロジェクト: yintianjun/autocrop
def test_obama_has_a_face():
    loc = 'tests/data/obama.jpg'
    obama = cv2.imread(loc)
    assert len(crop(obama, 500, 500)) == 500
コード例 #3
0
ファイル: test_autocrop.py プロジェクト: flushcash/autocrop
def test_size_changes_width_and_height():
    loc = 'tests/data/obama.jpg'
    obama = cv2.imread(loc)
    assert len(crop(obama, None, None, 350)) == 350