Skip to content

Commit

Permalink
Merge pull request #258 from cpcloud/skip-h5py-varlen-string-on-windows
Browse files Browse the repository at this point in the history
Skip h5py 2.5.0 tests for varlen string dtypes on windows and python 3.4
  • Loading branch information
cpcloud committed Jul 7, 2015
2 parents 943cddc + 05152f9 commit f72bf5b
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions odo/backends/tests/test_h5py.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
from __future__ import absolute_import, division, print_function

import pytest
pytest.importorskip('h5py')
h5py = pytest.importorskip('h5py')

import h5py
import os
import sys

from distutils.version import LooseVersion

import h5py
from contextlib import contextmanager

from odo.backends.h5py import append, create, resource, discover, convert
Expand Down Expand Up @@ -74,6 +78,15 @@ def test_discover():
assert str(discover(f)) == str(discover({'data': x}))


two_point_five_and_windows_py34 = \
pytest.mark.skipif(sys.platform == 'win32' and
h5py.__version__ == LooseVersion('2.5.0') and
sys.version_info[:2] == (3, 4),
reason=('h5py 2.5.0 issue with varlen string types: '
'https://github.com/h5py/h5py/issues/593'))


@two_point_five_and_windows_py34
def test_discover_on_data_with_object_in_record_name():
data = np.array([(u'a', 1), (u'b', 2)], dtype=[('lrg_object',
unicode_dtype),
Expand Down Expand Up @@ -208,6 +221,7 @@ def test_resource_with_variable_length():
r.file.close()


@two_point_five_and_windows_py34
def test_resource_with_option_types():
with tmpfile('.hdf5') as fn:
ds = datashape.dshape('4 * {name: ?string, amount: ?int32}')
Expand Down Expand Up @@ -236,6 +250,7 @@ def test_copy_with_into():
dset.file.close()


@two_point_five_and_windows_py34
def test_varlen_dtypes():
y = np.array([('Alice', 100), ('Bob', 200)],
dtype=[('name', 'O'), ('amount', 'i4')])
Expand Down

0 comments on commit f72bf5b

Please sign in to comment.