Skip to content

Commit

Permalink
Correction des tests unitaires
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolite committed Sep 1, 2023
1 parent 7e64927 commit 0040040
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
name: Release ${{ github.ref_name }}
generateReleaseNotes: true
draft: false
prerelease: false
prerelease: contains(${{ github.ref_name }},'beta')

build_and_test:

Expand Down
4 changes: 2 additions & 2 deletions tests/test_raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def test_ok_at_least_3_files(self, m_from_file, m_get_osgeo_path):
serial_out = rasterset.serializable
assert rasterset.srs == srs
m_get_osgeo_path.assert_called_once_with(list_path)
m_open.assert_called_once_with(file=list_local_path, mode="r")
m_open.assert_called_once_with(file=list_local_path)
assert rasterset.raster_list == raster_list
assert isinstance(serial_out["bbox"], list)
for i in range(0, 4, 1):
Expand Down Expand Up @@ -405,7 +405,7 @@ def test_simple_ok(self, m_from_parameters, m_get_osgeo_path):
rasterset = RasterSet.from_descriptor(desc_path)

m_get_osgeo_path.assert_called_once_with(desc_path)
m_open.assert_called_once_with(file=local_path, mode="r")
m_open.assert_called_once_with(file=local_path)
assert rasterset.srs == serial_in["srs"]
m_from_parameters.assert_called()
assert m_from_parameters.call_count == 3
Expand Down
2 changes: 1 addition & 1 deletion tests/test_tile_matrix_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_wrong_crs(mocked_get_data_str):
tms = TileMatrixSet("tms")
assert (
str(exc.value)
== "Wrong attribute 'crs' ('epsg:123456') in 'file:///path/to/tms.json', not recognize by OSR"
== "Wrong attribute 'crs' ('epsg:123456') in 'file:///path/to/tms.json', not recognize by OSR. Trace : PROJ: proj_create_from_database: crs not found"
)
mocked_get_data_str.assert_called_once_with("file:///path/to/tms.json")

Expand Down

0 comments on commit 0040040

Please sign in to comment.