Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-braun committed Dec 23, 2024
1 parent 69bf6d1 commit c47581a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ci/test_archives.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import shutil

import pytest
from CI.SCRIPTS.script_utils import files_path, s3_env
from lxml import etree, html

from ci.script_utils import files_path, s3_env
from sertit import archives, ci, files, path, s3, vectors


Expand Down
9 changes: 6 additions & 3 deletions ci/test_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
import tempfile

import pytest
from CI.SCRIPTS.script_utils import files_path, rasters_path, s3_env, vectors_path
from lxml import etree

from ci.script_utils import files_path, rasters_path, s3_env, vectors_path
from sertit import ci, path, rasters, rasters_rio, s3, vectors

ci.reduce_verbosity()
Expand Down Expand Up @@ -67,13 +67,16 @@ def test_assert_dir():


@s3_env
def test_assert_files():
def test_assert_files(tmp_path):
"""Test CI functions"""
ok_path = files_path().joinpath("productPreview.html")
false_path = files_path().joinpath("false.html")

ci.assert_files_equal(ok_path, ok_path)
ci.assert_files_equal(str(ok_path), str(ok_path))
if path.is_cloud_path(ok_path):
str_ok_path = str(s3.download(ok_path, tmp_path))

ci.assert_files_equal(str_ok_path, str_ok_path)
with pytest.raises(AssertionError):
ci.assert_files_equal(ok_path, false_path)

Expand Down
2 changes: 1 addition & 1 deletion ci/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
from datetime import date, datetime

import numpy as np
from CI.SCRIPTS.script_utils import Polarization

from ci.script_utils import Polarization
from sertit import AnyPath, ci, files

ci.reduce_verbosity()
Expand Down
2 changes: 1 addition & 1 deletion ci/test_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import tempfile

import pytest
from CI.SCRIPTS.script_utils import get_s3_ci_path

from ci.script_utils import get_s3_ci_path
from sertit import AnyPath, ci, misc, path

ci.reduce_verbosity()
Expand Down
2 changes: 1 addition & 1 deletion ci/test_vectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

import geopandas as gpd
import pytest
from CI.SCRIPTS.script_utils import KAPUT_KWARGS, files_path, s3_env, vectors_path
from shapely import wkt

from ci.script_utils import KAPUT_KWARGS, files_path, s3_env, vectors_path
from sertit import archives, ci, files, path, vectors
from sertit.vectors import EPSG_4326, DataSourceError

Expand Down

0 comments on commit c47581a

Please sign in to comment.