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/Lib/site-packages/h5py/tests/conftest.py
import h5py
import pytest


@pytest.fixture()
def writable_file(tmp_path):
    with h5py.File(tmp_path / 'test.h5', 'w') as f:
        yield f


def pytest_addoption(parser):
    parser.addoption(
        '--no-network', action='store_true', default=False, help='No network access'
    )


def pytest_collection_modifyitems(config, items):
    if config.getoption('--no-network'):
        nonet = pytest.mark.skip(reason='No Internet')
        for item in items:
            if 'nonetwork' in item.keywords:
                item.add_marker(nonet)