Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions xrspatial/geotiff/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import importlib.util
import math
import os
import socket
import struct

Expand Down Expand Up @@ -54,6 +55,14 @@ def loopback_available() -> bool:
not _HAS_LOOPBACK, reason="loopback bind unavailable in this environment"
)

_RUN_INTEGRATION = os.environ.get("XRSPATIAL_RUN_INTEGRATION", "") not in (
"", "0", "false", "False"
)
requires_integration = pytest.mark.skipif(
not _RUN_INTEGRATION,
reason="integration test; set XRSPATIAL_RUN_INTEGRATION=1 to run locally",
)


def pytest_collection_modifyitems(config, items):
"""Auto-skip tests that stand up a loopback HTTP server when the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@

from xrspatial.geotiff import open_geotiff, to_geotiff

from .conftest import requires_integration


def _tmp_path(name):
return os.path.join(tempfile.gettempdir(), name)


@requires_integration
class TestIntCoordRoundTripHotfix1962:
def test_int_coords_2d_round_trip(self):
pixels = np.arange(20, dtype=np.float32).reshape(4, 5)
Expand Down
Loading