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
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def lint(session):
session.run("pre-commit", "run", "--all-files", *session.posargs)


@nox.session(reuse_venv=True, venv_backend="uv")
@nox.session(reuse_venv=True)
def test(session):
"""Run the selected tests and report coverage in html."""
session.install(".[test]")
Expand Down
9 changes: 5 additions & 4 deletions pytest_gee/dictionary_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import Optional

import ee
from pytest import fail
from pytest_regressions.data_regression import DataRegressionFixture

from .utils import build_fullpath, check_serialized, round_data
Expand Down Expand Up @@ -41,7 +42,7 @@ def check(

# check the previously registered serialized call from GEE. If it matches the current call,
# we don't need to check the data
with suppress(BaseException):
with suppress(AssertionError, fail.Exception):
check_serialized(
object=ee.Dictionary(data_dict),
path=serialized_name,
Expand All @@ -63,16 +64,16 @@ def check(

# IF we are here it means the data has been modified so we edit the API call accordingly
# to make sure next run will not be forced to call the API for a response.
with suppress(BaseException):
with suppress(AssertionError, fail.Exception):
check_serialized(
object=data_dict,
path=data_name,
path=serialized_name,
datadir=self.datadir,
original_datadir=self.original_datadir,
request=self.request,
with_test_class_names=self.with_test_class_names,
force_regen=True,
)

except BaseException as e:
except (AssertionError, fail.Exception) as e:
raise e
9 changes: 5 additions & 4 deletions pytest_gee/feature_collection_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import ee
import geopandas as gpd
from pytest import fail
from pytest_regressions.data_regression import DataRegressionFixture

from .utils import build_fullpath, check_serialized, round_data
Expand Down Expand Up @@ -47,7 +48,7 @@ def check(

# check the previously registered serialized call from GEE. If it matches the current call,
# we don't need to check the data
with suppress(BaseException):
with suppress(AssertionError, fail.Exception):
check_serialized(
object=data_fc,
path=serialized_name,
Expand Down Expand Up @@ -76,16 +77,16 @@ def check(

# IF we are here it means the data has been modified so we edit the API call accordingly
# to make sure next run will not be forced to call the API for a response.
with suppress(BaseException):
with suppress(AssertionError, fail.Exception):
check_serialized(
object=data_fc,
path=data_name,
path=serialized_name,
datadir=self.datadir,
original_datadir=self.original_datadir,
request=self.request,
with_test_class_names=self.with_test_class_names,
force_regen=True,
)

except BaseException as e:
except (AssertionError, fail.Exception) as e:
raise e
7 changes: 4 additions & 3 deletions pytest_gee/image_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import ee
import requests
from pytest import fail
from pytest_regressions.image_regression import ImageRegressionFixture

from .utils import build_fullpath, check_serialized
Expand Down Expand Up @@ -61,7 +62,7 @@ def check(

# check the previously registered serialized call from GEE. If it matches the current call,
# we don't need to check the data
with suppress(BaseException):
with suppress(AssertionError, fail.Exception):
check_serialized(
object=data_image,
path=serialized_name,
Expand Down Expand Up @@ -97,7 +98,7 @@ def check(

# IF we are here it means the data has been modified so we edit the API call accordingly
# to make sure next run will not be forced to call the API for a response.
with suppress(BaseException):
with suppress(AssertionError, fail.Exception):
check_serialized(
object=data_image,
path=serialized_name,
Expand All @@ -108,5 +109,5 @@ def check(
force_regen=True,
)

except BaseException as e:
except (AssertionError, fail.Exception) as e:
raise e
9 changes: 5 additions & 4 deletions pytest_gee/list_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import Optional

import ee
from pytest import fail
from pytest_regressions.data_regression import DataRegressionFixture

from .utils import build_fullpath, check_serialized, round_data
Expand Down Expand Up @@ -41,7 +42,7 @@ def check(

# check the previously registered serialized call from GEE. If it matches the current call,
# we don't need to check the data
with suppress(BaseException):
with suppress(AssertionError, fail.Exception):
check_serialized(
object=data_list,
path=serialized_name,
Expand All @@ -63,16 +64,16 @@ def check(

# IF we are here it means the data has been modified so we edit the API call accordingly
# to make sure next run will not be forced to call the API for a response.
with suppress(BaseException):
with suppress(AssertionError, fail.Exception):
check_serialized(
object=data_list,
path=data_name,
path=serialized_name,
datadir=self.datadir,
original_datadir=self.original_datadir,
request=self.request,
with_test_class_names=self.with_test_class_names,
force_regen=True,
)

except BaseException as e:
except (AssertionError, fail.Exception) as e:
raise e

This file was deleted.

Loading