Skip to content

Commit

Permalink
Avoiding pytest.warns for travis
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed Apr 4, 2016
1 parent 0e7b999 commit 9a8db79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ upload-dir = docs/_build/html
show-response = 1

[pytest]
minversion = 2.8
minversion = 2.2
norecursedirs = build docs/_build
doctest_plus = enabled

Expand Down
8 changes: 3 additions & 5 deletions shampoo/tests/test_hologram.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,13 @@ def test_centroid():

def test_crop_image():
# Even number rows/cols
image1 = np.arange(100).reshape((10, 10))
image1 = np.arange(1024).reshape((32, 32))
new_shape1 = (image1.shape[0]//2, image1.shape[1]//2)
with pytest.warns(CropEfficiencyWarning):
cropped_image1 = _crop_image(image1, 0.5)
cropped_image1 = _crop_image(image1, 0.5)
assert new_shape1 == cropped_image1.shape

# Odd number rows/cols
image2 = np.arange(121).reshape((11, 11))
new_shape2 = (image2.shape[0]//2 + 1, image2.shape[1]//2 + 1)
with pytest.warns(CropEfficiencyWarning):
cropped_image2 = _crop_image(image2, 0.5)
cropped_image2 = _crop_image(image2, 0.5)
assert new_shape2 == cropped_image2.shape

0 comments on commit 9a8db79

Please sign in to comment.