HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Users/fred/anaconda3/pkgs/imagecodecs-2023.1.23-py312hd5bf116_1/info/test/tests/conftest.py
# imagecodecs/tests/conftest.py

import os
import sys

if os.environ.get('VSCODE_CWD'):
    # work around pytest not using PYTHONPATH in VSCode
    sys.path.insert(
        0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
    )


def pytest_report_header(config):

    try:
        pyversion = f'Python {sys.version.splitlines()[0]}'
        import imagecodecs
        from imagecodecs import _imagecodecs

        return '{}\npackagedir: {}\nversion: {}\ndependencies: {}'.format(
            pyversion,
            imagecodecs.__path__[0],
            imagecodecs.version(),
            _imagecodecs.version(),
        )
    except Exception as exc:
        return f'pytest_report_header failed: {exc!s}'