Skip to content

Commit

Permalink
Fix another OS X test that can be flakey on Azure (#3063)
Browse files Browse the repository at this point in the history
  • Loading branch information
shoyer committed Jul 2, 2019
1 parent c6c8af7 commit e26fbca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xarray/tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,9 @@ def test_encoding_kwarg(self):
ds = Dataset({'x': ('y', np.arange(10.0))})
kwargs = dict(encoding={'x': {'dtype': 'f4'}})
with self.roundtrip(ds, save_kwargs=kwargs) as actual:
assert actual.x.encoding['dtype'] == 'f4'
encoded_dtype = actual.x.encoding['dtype']
# On OS X, dtype sometimes switches endianness for unclear reasons
assert encoded_dtype.kind == 'f' and encoded_dtype.itemsize == 4
assert ds.x.encoding == {}

kwargs = dict(encoding={'x': {'foo': 'bar'}})
Expand Down

0 comments on commit e26fbca

Please sign in to comment.