Skip to content

Commit

Permalink
test: replace pkg_resources with packaging.version for version parsin…
Browse files Browse the repository at this point in the history
…g/comparison
  • Loading branch information
jhamman committed Jun 28, 2023
1 parent 327b694 commit 6d42c84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zarr/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
from tempfile import mkdtemp

import numpy as np
import packaging.version
import pytest
from numcodecs import (BZ2, JSON, LZ4, Blosc, Categorize, Delta,
FixedScaleOffset, GZip, MsgPack, Pickle, VLenArray,
VLenBytes, VLenUTF8, Zlib)
from numcodecs.compat import ensure_bytes, ensure_ndarray
from numcodecs.tests.common import greetings
from numpy.testing import assert_array_almost_equal, assert_array_equal
from pkg_resources import parse_version

import zarr
from zarr._storage.store import (
Expand Down Expand Up @@ -1389,7 +1389,7 @@ def test_object_codec_warnings(self):
z = self.create_array(shape=10, chunks=5, dtype="i4", object_codec=JSON())
z.store.close()

@unittest.skipIf(parse_version(np.__version__) < parse_version('1.14.0'),
@unittest.skipIf(packaging.version.parse(np.__version__) < packaging.version.parse('1.14.0'),
"unsupported numpy version")
def test_structured_array_contain_object(self):

Expand Down

0 comments on commit 6d42c84

Please sign in to comment.