Skip to content

Commit

Permalink
Update satellite data for testing
Browse files Browse the repository at this point in the history
Updated satellite data for testing and variable type conversions in comparison
  • Loading branch information
jasonkwok475 committed Nov 24, 2024
1 parent e436258 commit 85c884c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main_window/competition/mapping/mapbox_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def appendh(A, B):

t2 = time.perf_counter()
LOGGER.debug(f"Successfully generated size {str(self.scale)} map in {t2 - t1} seconds.")
return img
return plt.imread(outfile, "jpeg")
else:
LOGGER.debug(f"Found size {str(self.scale)} map!")
return plt.imread(outfile, "jpeg")
Expand Down
4 changes: 2 additions & 2 deletions tests/test_mapbox_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_get_image_exists(self, hennings_tile, mocker):
mocked_tile.return_value.content = cv2.imencode('.png', cv2.imread(impath))[1]

# Pass true to overwrite as image file may exist from previous tests
i = hennings_tile.getImage(True)
i = hennings_tile.getImage(overwrite=True)

numpy.testing.assert_array_equal(i, hennings_image)

Expand Down Expand Up @@ -152,7 +152,7 @@ def test_gen_stitched_map(self, ubc_tile_grid):
"jpeg", # Needed to make sure MPL doesn't use Pillow and return decimals.
)

ubc_tile_grid.downloadArrayImages()
ubc_tile_grid.downloadArrayImages(overwrite=True)
stitched_map = ubc_tile_grid.genStitchedMap()

# assert_allclose because linux vs. windows can decode the images slightly differently
Expand Down
Binary file modified tests/test_mapbox_utils/41322_89729.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/test_mapbox_utils/output_18_41321-41323_89729-89730.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 85c884c

Please sign in to comment.