diff --git a/.github/codecov.yml b/.github/codecov.yml index e9b2ef7cd..c910cfa5e 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -8,7 +8,7 @@ coverage: default: target: 100 ignore: - - "numcodecs/tests/**" + - "tests/**" comment: layout: "diff, files" behavior: default diff --git a/MANIFEST.in b/MANIFEST.in index 41513ecbc..6469633e1 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,3 @@ recursive-include c-blosc * recursive-include numcodecs *.pyx recursive-include numcodecs *.pxd -include numcodecs/tests/package_with_entrypoint-0.1.dist-info/entry_points.txt diff --git a/docs/release.rst b/docs/release.rst index fcd3422f1..093466a6a 100644 --- a/docs/release.rst +++ b/docs/release.rst @@ -17,6 +17,12 @@ Release notes Unreleased ---------- +Maintenance +~~~~~~~~~~~ + +* Move tests out of installable package into top-level ``tests/`` directory. + By :user:`Max Jones `, :issue:`829` + .. _release_0.16.5: 0.16.5 diff --git a/notebooks/benchmark_vlen.ipynb b/notebooks/benchmark_vlen.ipynb index cb971278e..6870bef6a 100644 --- a/notebooks/benchmark_vlen.ipynb +++ b/notebooks/benchmark_vlen.ipynb @@ -63,18 +63,10 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], - "source": [ - "from numcodecs.tests.common import greetings\n", - "\n", - "msgpack_codec = numcodecs.MsgPack()\n", - "json_codec = numcodecs.JSON()\n", - "pickle_codec = numcodecs.Pickle()\n", - "cat_codec = numcodecs.Categorize(greetings, dtype=object, astype='u1')\n", - "vlen_codec = numcodecs.VLenUTF8()" - ] + "source": "from tests.common import greetings\n\nmsgpack_codec = numcodecs.MsgPack()\njson_codec = numcodecs.JSON()\npickle_codec = numcodecs.Pickle()\ncat_codec = numcodecs.Categorize(greetings, dtype=object, astype='u1')\nvlen_codec = numcodecs.VLenUTF8()" }, { "cell_type": "markdown", @@ -677,4 +669,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} +} \ No newline at end of file diff --git a/numcodecs/tests/__init__.py b/numcodecs/tests/__init__.py deleted file mode 100644 index bb4e151d1..000000000 --- a/numcodecs/tests/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -import pytest - -pytest.register_assert_rewrite('numcodecs.tests.common') diff --git a/pyproject.toml b/pyproject.toml index a47600dc3..57cc28e91 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,14 +101,11 @@ test-zarr-main = [ [tool.setuptools] package-dir = {"" = "."} -packages = ["numcodecs", "numcodecs.tests"] +packages = ["numcodecs"] zip-safe = false [tool.setuptools.package-data] -numcodecs = [ - "tests/package_with_entrypoint/__init__.py", - "tests/package_with_entrypoint-0.1.dist-info/entry_points.txt" -] +numcodecs = [] [tool.setuptools_scm] version_scheme = "guess-next-dev" @@ -120,7 +117,7 @@ skip = "./.git,fixture" ignore-words-list = "ba, compiletime, hist, nd, unparseable" [tool.coverage.run] -omit = ["numcodecs/tests/*"] +omit = ["tests/*"] [tool.coverage.report] exclude_lines = [ @@ -139,7 +136,7 @@ doctest_optionflags = [ "IGNORE_EXCEPTION_DETAIL", ] testpaths = [ - "numcodecs/tests", + "tests", ] norecursedirs = [ ".git", @@ -230,7 +227,7 @@ ignore = [ ] [tool.ruff.lint.extend-per-file-ignores] -"numcodecs/tests/**" = ["SIM201", "SIM202", "SIM300", "TRY002"] +"tests/**" = ["SIM201", "SIM202", "SIM300", "TRY002"] "notebooks/**" = ["W391"] # https://github.com/astral-sh/ruff/issues/13763 [tool.ruff.format] @@ -287,9 +284,9 @@ test-google-crc32c = ["test", "test-google-crc32c"] ls-deps-312 = "uv run --group test-zarr-312 uv pip freeze" ls-deps-313 = "uv run --group test-zarr-313 uv pip freeze" ls-deps-main = "uv run --group test-zarr-main uv pip freeze" -test-zarr-312 = "uv run --group test-zarr-312 pytest --cov=numcodecs --cov-report=xml --cov-report=term numcodecs/tests/test_zarr3.py numcodecs/tests/test_zarr3_import.py" -test-zarr-313 = "uv run --group test-zarr-313 pytest --cov=numcodecs --cov-report=xml --cov-report=term numcodecs/tests/test_zarr3.py numcodecs/tests/test_zarr3_import.py" -test-zarr-main = "uv run --group test-zarr-main pytest --cov=numcodecs --cov-report=xml --cov-report=term numcodecs/tests/test_zarr3.py numcodecs/tests/test_zarr3_import.py" +test-zarr-312 = "uv run --group test-zarr-312 pytest --cov=numcodecs --cov-report=xml --cov-report=term tests/test_zarr3.py tests/test_zarr3_import.py" +test-zarr-313 = "uv run --group test-zarr-313 pytest --cov=numcodecs --cov-report=xml --cov-report=term tests/test_zarr3.py tests/test_zarr3_import.py" +test-zarr-main = "uv run --group test-zarr-main pytest --cov=numcodecs --cov-report=xml --cov-report=term tests/test_zarr3.py tests/test_zarr3_import.py" [tool.pixi.feature.test.tasks] run-tests = "pytest -v" diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 000000000..76094f9ee --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1,3 @@ +import pytest + +pytest.register_assert_rewrite('tests.common') diff --git a/numcodecs/tests/common.py b/tests/common.py similarity index 99% rename from numcodecs/tests/common.py rename to tests/common.py index e3c9cfb3e..31685d955 100644 --- a/numcodecs/tests/common.py +++ b/tests/common.py @@ -6,11 +6,10 @@ import numpy as np import pytest -from numpy.testing import assert_array_almost_equal, assert_array_equal - from numcodecs import * # noqa: F403 # for eval to find names in repr tests from numcodecs.compat import ensure_bytes, ensure_ndarray from numcodecs.registry import get_codec +from numpy.testing import assert_array_almost_equal, assert_array_equal greetings = [ '¡Hola mundo!', diff --git a/numcodecs/tests/package_with_entrypoint-0.1.dist-info/entry_points.txt b/tests/package_with_entrypoint-0.1.dist-info/entry_points.txt similarity index 100% rename from numcodecs/tests/package_with_entrypoint-0.1.dist-info/entry_points.txt rename to tests/package_with_entrypoint-0.1.dist-info/entry_points.txt diff --git a/numcodecs/tests/package_with_entrypoint/__init__.py b/tests/package_with_entrypoint/__init__.py similarity index 100% rename from numcodecs/tests/package_with_entrypoint/__init__.py rename to tests/package_with_entrypoint/__init__.py diff --git a/numcodecs/tests/test_astype.py b/tests/test_astype.py similarity index 98% rename from numcodecs/tests/test_astype.py rename to tests/test_astype.py index b4653f5be..d0cc4c596 100644 --- a/numcodecs/tests/test_astype.py +++ b/tests/test_astype.py @@ -1,8 +1,8 @@ import numpy as np +from numcodecs.astype import AsType from numpy.testing import assert_array_equal -from numcodecs.astype import AsType -from numcodecs.tests.common import ( +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode, diff --git a/numcodecs/tests/test_base64.py b/tests/test_base64.py similarity index 98% rename from numcodecs/tests/test_base64.py rename to tests/test_base64.py index 03f2d491c..71d671c7b 100644 --- a/numcodecs/tests/test_base64.py +++ b/tests/test_base64.py @@ -2,9 +2,9 @@ import numpy as np import pytest - from numcodecs.base64 import Base64 -from numcodecs.tests.common import ( + +from tests.common import ( check_backwards_compatibility, check_encode_decode, check_err_decode_object_buffer, diff --git a/numcodecs/tests/test_bitround.py b/tests/test_bitround.py similarity index 99% rename from numcodecs/tests/test_bitround.py rename to tests/test_bitround.py index 3929e43c6..663cf73a3 100644 --- a/numcodecs/tests/test_bitround.py +++ b/tests/test_bitround.py @@ -1,6 +1,5 @@ import numpy as np import pytest - from numcodecs.bitround import BitRound, max_bits # adapted from https://github.com/milankl/BitInformation.jl/blob/main/test/round_nearest.jl diff --git a/numcodecs/tests/test_blosc.py b/tests/test_blosc.py similarity index 99% rename from numcodecs/tests/test_blosc.py rename to tests/test_blosc.py index 52ef183a4..6e1927302 100644 --- a/numcodecs/tests/test_blosc.py +++ b/tests/test_blosc.py @@ -11,7 +11,7 @@ pytest.skip("numcodecs.blosc not available", allow_module_level=True) -from numcodecs.tests.common import ( +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode, diff --git a/numcodecs/tests/test_bz2.py b/tests/test_bz2.py similarity index 98% rename from numcodecs/tests/test_bz2.py rename to tests/test_bz2.py index ce83f1e2d..a58446ca2 100644 --- a/numcodecs/tests/test_bz2.py +++ b/tests/test_bz2.py @@ -1,9 +1,9 @@ import itertools import numpy as np - from numcodecs.bz2 import BZ2 -from numcodecs.tests.common import ( + +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode, diff --git a/numcodecs/tests/test_categorize.py b/tests/test_categorize.py similarity index 98% rename from numcodecs/tests/test_categorize.py rename to tests/test_categorize.py index 0ec115bb3..8431d4fb9 100644 --- a/numcodecs/tests/test_categorize.py +++ b/tests/test_categorize.py @@ -1,9 +1,9 @@ import numpy as np import pytest +from numcodecs.categorize import Categorize from numpy.testing import assert_array_equal -from numcodecs.categorize import Categorize -from numcodecs.tests.common import ( +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode, diff --git a/numcodecs/tests/test_checksum32.py b/tests/test_checksum32.py similarity index 99% rename from numcodecs/tests/test_checksum32.py rename to tests/test_checksum32.py index 06b0a1a8c..fe51084b3 100644 --- a/numcodecs/tests/test_checksum32.py +++ b/tests/test_checksum32.py @@ -4,9 +4,9 @@ import numpy as np import pytest - from numcodecs.checksum32 import CRC32, Adler32 -from numcodecs.tests.common import ( + +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode, diff --git a/numcodecs/tests/test_compat.py b/tests/test_compat.py similarity index 99% rename from numcodecs/tests/test_compat.py rename to tests/test_compat.py index 0d5f2d74e..091e34539 100644 --- a/numcodecs/tests/test_compat.py +++ b/tests/test_compat.py @@ -3,7 +3,6 @@ import numpy as np import pytest - from numcodecs.compat import ensure_bytes, ensure_contiguous_ndarray, ensure_text diff --git a/numcodecs/tests/test_delta.py b/tests/test_delta.py similarity index 97% rename from numcodecs/tests/test_delta.py rename to tests/test_delta.py index 9664efeee..08df959b9 100644 --- a/numcodecs/tests/test_delta.py +++ b/tests/test_delta.py @@ -1,9 +1,9 @@ import numpy as np import pytest +from numcodecs.delta import Delta from numpy.testing import assert_array_equal -from numcodecs.delta import Delta -from numcodecs.tests.common import ( +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode, diff --git a/numcodecs/tests/test_entrypoints.py b/tests/test_entrypoints.py similarity index 99% rename from numcodecs/tests/test_entrypoints.py rename to tests/test_entrypoints.py index 43503ec39..25eb9d34d 100644 --- a/numcodecs/tests/test_entrypoints.py +++ b/tests/test_entrypoints.py @@ -1,9 +1,8 @@ import os.path import sys -import pytest - import numcodecs.registry +import pytest here = os.path.abspath(os.path.dirname(__file__)) diff --git a/numcodecs/tests/test_entrypoints_backport.py b/tests/test_entrypoints_backport.py similarity index 99% rename from numcodecs/tests/test_entrypoints_backport.py rename to tests/test_entrypoints_backport.py index 7e1c32bcc..ff1b02a67 100644 --- a/numcodecs/tests/test_entrypoints_backport.py +++ b/tests/test_entrypoints_backport.py @@ -3,9 +3,8 @@ import sys from multiprocessing import Process -import pytest - import numcodecs.registry +import pytest importlib_spec = importlib.util.find_spec("importlib_metadata") if importlib_spec is None or importlib_spec.loader is None: # pragma: no cover diff --git a/numcodecs/tests/test_fixedscaleoffset.py b/tests/test_fixedscaleoffset.py similarity index 98% rename from numcodecs/tests/test_fixedscaleoffset.py rename to tests/test_fixedscaleoffset.py index 337e893ee..9c9e36dfb 100644 --- a/numcodecs/tests/test_fixedscaleoffset.py +++ b/tests/test_fixedscaleoffset.py @@ -2,10 +2,10 @@ import numpy as np import pytest +from numcodecs.fixedscaleoffset import FixedScaleOffset from numpy.testing import assert_array_equal -from numcodecs.fixedscaleoffset import FixedScaleOffset -from numcodecs.tests.common import ( +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode, diff --git a/numcodecs/tests/test_fletcher32.py b/tests/test_fletcher32.py similarity index 99% rename from numcodecs/tests/test_fletcher32.py rename to tests/test_fletcher32.py index 3bbefe850..adfb31da6 100644 --- a/numcodecs/tests/test_fletcher32.py +++ b/tests/test_fletcher32.py @@ -1,6 +1,5 @@ import numpy as np import pytest - from numcodecs.fletcher32 import Fletcher32 diff --git a/numcodecs/tests/test_gzip.py b/tests/test_gzip.py similarity index 98% rename from numcodecs/tests/test_gzip.py rename to tests/test_gzip.py index d63676412..745b6b025 100644 --- a/numcodecs/tests/test_gzip.py +++ b/tests/test_gzip.py @@ -2,9 +2,9 @@ import numpy as np import pytest - from numcodecs.gzip import GZip -from numcodecs.tests.common import ( + +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode, diff --git a/numcodecs/tests/test_jenkins.py b/tests/test_jenkins.py similarity index 99% rename from numcodecs/tests/test_jenkins.py rename to tests/test_jenkins.py index de008be52..2187934b1 100644 --- a/numcodecs/tests/test_jenkins.py +++ b/tests/test_jenkins.py @@ -1,6 +1,5 @@ import numpy as np import pytest - from numcodecs.checksum32 import JenkinsLookup3 from numcodecs.jenkins import jenkins_lookup3 diff --git a/numcodecs/tests/test_json.py b/tests/test_json.py similarity index 98% rename from numcodecs/tests/test_json.py rename to tests/test_json.py index 771a05191..94a8b1c2a 100644 --- a/numcodecs/tests/test_json.py +++ b/tests/test_json.py @@ -2,9 +2,9 @@ import numpy as np import pytest - from numcodecs.json import JSON -from numcodecs.tests.common import ( + +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode_array, diff --git a/numcodecs/tests/test_lz4.py b/tests/test_lz4.py similarity index 98% rename from numcodecs/tests/test_lz4.py rename to tests/test_lz4.py index 82af464af..c6b8faec9 100644 --- a/numcodecs/tests/test_lz4.py +++ b/tests/test_lz4.py @@ -9,7 +9,7 @@ pytest.skip("numcodecs.lz4 not available", allow_module_level=True) -from numcodecs.tests.common import ( +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode, diff --git a/numcodecs/tests/test_lzma.py b/tests/test_lzma.py similarity index 98% rename from numcodecs/tests/test_lzma.py rename to tests/test_lzma.py index 017f6da65..ff36cc428 100644 --- a/numcodecs/tests/test_lzma.py +++ b/tests/test_lzma.py @@ -13,7 +13,7 @@ raise unittest.SkipTest("LZMA not available") from e -from numcodecs.tests.common import ( +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode, diff --git a/numcodecs/tests/test_msgpacks.py b/tests/test_msgpacks.py similarity index 99% rename from numcodecs/tests/test_msgpacks.py rename to tests/test_msgpacks.py index 4f8778459..0792cdfdd 100644 --- a/numcodecs/tests/test_msgpacks.py +++ b/tests/test_msgpacks.py @@ -9,7 +9,7 @@ raise unittest.SkipTest("msgpack not available") from e -from numcodecs.tests.common import ( +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode_array, diff --git a/numcodecs/tests/test_ndarray_like.py b/tests/test_ndarray_like.py similarity index 99% rename from numcodecs/tests/test_ndarray_like.py rename to tests/test_ndarray_like.py index 6c16e7dbf..ff10e2400 100644 --- a/numcodecs/tests/test_ndarray_like.py +++ b/tests/test_ndarray_like.py @@ -1,5 +1,4 @@ import pytest - from numcodecs.ndarray_like import DType, FlagsObj, NDArrayLike diff --git a/numcodecs/tests/test_packbits.py b/tests/test_packbits.py similarity index 96% rename from numcodecs/tests/test_packbits.py rename to tests/test_packbits.py index 303216172..10f058daf 100644 --- a/numcodecs/tests/test_packbits.py +++ b/tests/test_packbits.py @@ -1,7 +1,7 @@ import numpy as np - from numcodecs.packbits import PackBits -from numcodecs.tests.common import ( + +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode, diff --git a/numcodecs/tests/test_pcodec.py b/tests/test_pcodec.py similarity index 98% rename from numcodecs/tests/test_pcodec.py rename to tests/test_pcodec.py index d0520b45e..e34d66589 100644 --- a/numcodecs/tests/test_pcodec.py +++ b/tests/test_pcodec.py @@ -6,7 +6,7 @@ except ImportError: # pragma: no cover pytest.skip("pcodec not available", allow_module_level=True) -from numcodecs.tests.common import ( +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode_array, diff --git a/numcodecs/tests/test_pickles.py b/tests/test_pickles.py similarity index 97% rename from numcodecs/tests/test_pickles.py rename to tests/test_pickles.py index 6f7ad2f7b..3012f6110 100644 --- a/numcodecs/tests/test_pickles.py +++ b/tests/test_pickles.py @@ -3,9 +3,9 @@ import numpy as np import pytest - from numcodecs.pickles import Pickle -from numcodecs.tests.common import ( + +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode_array, diff --git a/numcodecs/tests/test_pyzstd.py b/tests/test_pyzstd.py similarity index 99% rename from numcodecs/tests/test_pyzstd.py rename to tests/test_pyzstd.py index 7ee6084b4..e6df84a71 100644 --- a/numcodecs/tests/test_pyzstd.py +++ b/tests/test_pyzstd.py @@ -3,7 +3,6 @@ import numpy as np import pytest import pyzstd - from numcodecs.zstd import Zstd test_data = [ diff --git a/numcodecs/tests/test_quantize.py b/tests/test_quantize.py similarity index 98% rename from numcodecs/tests/test_quantize.py rename to tests/test_quantize.py index c070ed72b..f29aae4db 100644 --- a/numcodecs/tests/test_quantize.py +++ b/tests/test_quantize.py @@ -2,10 +2,10 @@ import numpy as np import pytest +from numcodecs.quantize import Quantize from numpy.testing import assert_array_almost_equal, assert_array_equal -from numcodecs.quantize import Quantize -from numcodecs.tests.common import ( +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode, diff --git a/numcodecs/tests/test_registry.py b/tests/test_registry.py similarity index 99% rename from numcodecs/tests/test_registry.py rename to tests/test_registry.py index 93ed8f032..a5e52ba01 100644 --- a/numcodecs/tests/test_registry.py +++ b/tests/test_registry.py @@ -1,8 +1,7 @@ import inspect -import pytest - import numcodecs +import pytest from numcodecs.errors import UnknownCodecError from numcodecs.registry import get_codec diff --git a/numcodecs/tests/test_shuffle.py b/tests/test_shuffle.py similarity index 99% rename from numcodecs/tests/test_shuffle.py rename to tests/test_shuffle.py index 6e6d744a1..8035c5586 100644 --- a/numcodecs/tests/test_shuffle.py +++ b/tests/test_shuffle.py @@ -10,7 +10,7 @@ pytest.skip("numcodecs.shuffle not available", allow_module_level=True) -from numcodecs.tests.common import ( +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode, diff --git a/numcodecs/tests/test_vlen_array.py b/tests/test_vlen_array.py similarity index 98% rename from numcodecs/tests/test_vlen_array.py rename to tests/test_vlen_array.py index 79d6be42d..f25374a06 100644 --- a/numcodecs/tests/test_vlen_array.py +++ b/tests/test_vlen_array.py @@ -7,7 +7,7 @@ from numcodecs.vlen import VLenArray except ImportError as e: # pragma: no cover raise unittest.SkipTest("vlen-array not available") from e -from numcodecs.tests.common import ( +from tests.common import ( assert_array_items_equal, check_backwards_compatibility, check_config, diff --git a/numcodecs/tests/test_vlen_bytes.py b/tests/test_vlen_bytes.py similarity index 98% rename from numcodecs/tests/test_vlen_bytes.py rename to tests/test_vlen_bytes.py index 3546dbaa7..facd09472 100644 --- a/numcodecs/tests/test_vlen_bytes.py +++ b/tests/test_vlen_bytes.py @@ -7,7 +7,7 @@ from numcodecs.vlen import VLenBytes except ImportError as e: # pragma: no cover raise unittest.SkipTest("vlen-bytes not available") from e -from numcodecs.tests.common import ( +from tests.common import ( assert_array_items_equal, check_backwards_compatibility, check_config, diff --git a/numcodecs/tests/test_vlen_utf8.py b/tests/test_vlen_utf8.py similarity index 98% rename from numcodecs/tests/test_vlen_utf8.py rename to tests/test_vlen_utf8.py index 514c7dc16..ee54793cb 100644 --- a/numcodecs/tests/test_vlen_utf8.py +++ b/tests/test_vlen_utf8.py @@ -7,7 +7,7 @@ from numcodecs.vlen import VLenUTF8 except ImportError as e: # pragma: no cover raise unittest.SkipTest("vlen-utf8 not available") from e -from numcodecs.tests.common import ( +from tests.common import ( assert_array_items_equal, check_backwards_compatibility, check_config, diff --git a/numcodecs/tests/test_zarr3.py b/tests/test_zarr3.py similarity index 100% rename from numcodecs/tests/test_zarr3.py rename to tests/test_zarr3.py diff --git a/numcodecs/tests/test_zarr3_import.py b/tests/test_zarr3_import.py similarity index 100% rename from numcodecs/tests/test_zarr3_import.py rename to tests/test_zarr3_import.py diff --git a/numcodecs/tests/test_zfpy.py b/tests/test_zfpy.py similarity index 98% rename from numcodecs/tests/test_zfpy.py rename to tests/test_zfpy.py index e48c3cb7d..3c15aacb8 100644 --- a/numcodecs/tests/test_zfpy.py +++ b/tests/test_zfpy.py @@ -11,7 +11,7 @@ pytest.skip("ZFPY not available", allow_module_level=True) -from numcodecs.tests.common import ( +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode_array, diff --git a/numcodecs/tests/test_zlib.py b/tests/test_zlib.py similarity index 98% rename from numcodecs/tests/test_zlib.py rename to tests/test_zlib.py index 15f1ef587..c5043722b 100644 --- a/numcodecs/tests/test_zlib.py +++ b/tests/test_zlib.py @@ -2,8 +2,9 @@ import numpy as np import pytest +from numcodecs.zlib import Zlib -from numcodecs.tests.common import ( +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode, @@ -11,7 +12,6 @@ check_err_encode_object_buffer, check_repr, ) -from numcodecs.zlib import Zlib codecs = [ Zlib(), diff --git a/numcodecs/tests/test_zstd.py b/tests/test_zstd.py similarity index 99% rename from numcodecs/tests/test_zstd.py rename to tests/test_zstd.py index a3a926ebd..09342088a 100644 --- a/numcodecs/tests/test_zstd.py +++ b/tests/test_zstd.py @@ -3,8 +3,9 @@ import numpy as np import pytest +from numcodecs.zstd import Zstd -from numcodecs.tests.common import ( +from tests.common import ( check_backwards_compatibility, check_config, check_encode_decode, @@ -12,7 +13,6 @@ check_err_encode_object_buffer, check_repr, ) -from numcodecs.zstd import Zstd codecs = [ Zstd(),