Skip to content

Commit

Permalink
Skip test_write_images on Linux (#702)
Browse files Browse the repository at this point in the history
* Skip test_write_images on Linux

* Replace double quotes with single quotes

* Fix import order

* Add guard to imaging import

* Adjust wording of reason for skipping tests

* Add news
  • Loading branch information
marcoesters authored Jul 24, 2023
1 parent 9c16ce1 commit 3d93d57
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
19 changes: 19 additions & 0 deletions news/702-skip-imaging-test-linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Enhancements

* <news item>

### Bug fixes

* Skip imaging tests if not Windows or MacOS to avoid import errors (#702)

### Deprecations

* <news item>

### Docs

* <news item>

### Other

* <news item>
10 changes: 9 additions & 1 deletion tests/test_imaging.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import shutil
import sys
import tempfile

from constructor.imaging import write_images
import pytest

if sys.platform == "win32" or sys.platform == "darwin":
from constructor.imaging import write_images


@pytest.mark.skipif(
sys.platform != 'win32' and sys.platform != 'darwin',
reason='imaging only available on Windows and MacOS'
)
def test_write_images():
tmp_dir = tempfile.mkdtemp()

Expand Down

0 comments on commit 3d93d57

Please sign in to comment.