Skip to content

Commit

Permalink
TEST: Don't raise error if ctest_zran is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldmccarthy committed Nov 6, 2023
1 parent 3161fab commit bc16410
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions indexed_gzip/tests/test_zran.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,23 @@

from __future__ import print_function

import warnings

import sys

if not sys.platform.startswith("win"):
try:
from . import ctest_zran
except ImportError:
warnings.warn(UserWarning('indexed_gzip.ctest_zran not '
'found - cannot run zran tests'))
ctest_zran = None

if (ctest_zran is not None) and (not sys.platform.startswith("win")):
# Run these tests only on POSIX systems
import pytest

import numpy as np

from . import ctest_zran

pytestmark = pytest.mark.zran_test

def test_fread():
Expand Down

0 comments on commit bc16410

Please sign in to comment.