File: test_zarr.py

package info (click to toggle)
zarr 3.1.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,068 kB
  • sloc: python: 31,589; makefile: 10
file content (29 lines) | stat: -rw-r--r-- 690 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import pytest

import zarr


def test_exports() -> None:
    """
    Ensure that everything in __all__ can be imported.
    """
    from zarr import __all__

    for export in __all__:
        getattr(zarr, export)


def test_print_debug_info(capsys: pytest.CaptureFixture[str]) -> None:
    """
    Ensure that print_debug_info does not raise an error
    """
    from importlib.metadata import version

    from zarr import __version__, print_debug_info

    print_debug_info()
    captured = capsys.readouterr()
    # test that at least some of what we expect is
    # printed out
    assert f"zarr: {__version__}" in captured.out
    assert f"numpy: {version('numpy')}" in captured.out