Skip to content

Commit

Permalink
tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
kwinkunks committed Feb 20, 2022
1 parent 2a9a286 commit 8a34c25
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[pytest]
filterwarnings =
ignore::DeprecationWarning:skimage.*
10 changes: 7 additions & 3 deletions tests/test_snowfake.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,17 @@ def test_rectify():
assert s.rectify('c').shape == (15, 15)

def test_rectify_skimage():
"""
skimage's DeprecationWarnings are ignored; see pytest.ini.
"""
s = Snowfake(size=15, random=False, **params)
s.grow(max_epochs=3)
# This is a bug really, but it's what it does right now...
assert s.rectify_skimage('c').shape == (12, 12)

def test_random():
s = snowfake.random()
s.grow(max_epochs=3)
s = snowfake.random(seed=42)
s.grow(max_epochs=3)
assert 'random' in s.params

s = snowfake.random(rho=0.35, seed=42)
assert s.params['ρ'] == 0.35

0 comments on commit 8a34c25

Please sign in to comment.