Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests on windows #183

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set version = "4.9.2" %}
{% set build = 9 %}
{% set build = 10 %}

# recipe-lint fails if mpi is undefined
{% set mpi = mpi or 'nompi' %}
Expand Down Expand Up @@ -87,10 +87,15 @@ requirements:
- aws-sdk-cpp

test:
files:
- test_netcdf.py
requires:
- netcdf4
commands:
- test ! -f ${PREFIX}/lib/libnetcdf.a # [not win]
- test -f ${PREFIX}/lib/libnetcdf${SHLIB_EXT} # [not win]
- nc-config --all # [not win]
- python -c "import test_netcdf; test_netcdf.test_netcdf"
zklaus marked this conversation as resolved.
Show resolved Hide resolved

about:
home: http://www.unidata.ucar.edu/software/netcdf/
Expand Down
1 change: 1 addition & 0 deletions recipe/run_test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
%PYTHON% -c "import test_netcdf; test_netcdf.test_netcdf"
zklaus marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 6 additions & 0 deletions recipe/test_netcdf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from netCDF4 import Dataset


def test_netcdf4():
nc = Dataset("test_netcdf4_python.nc", mode="w")
nc.close()
Loading