From 8a34c254121e7a1e9ce33cb126858083ad8eb648 Mon Sep 17 00:00:00 2001 From: kwinkunks Date: Sat, 19 Feb 2022 21:13:28 -0400 Subject: [PATCH] tests passing --- pytest.ini | 3 +++ tests/test_snowfake.py | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 pytest.ini diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..4c5e6ea --- /dev/null +++ b/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +filterwarnings = + ignore::DeprecationWarning:skimage.* \ No newline at end of file diff --git a/tests/test_snowfake.py b/tests/test_snowfake.py index e189764..0a216b6 100644 --- a/tests/test_snowfake.py +++ b/tests/test_snowfake.py @@ -49,6 +49,9 @@ 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... @@ -56,6 +59,7 @@ def test_rectify_skimage(): 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