Skip to content

Commit

Permalink
unit test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jdries committed Jun 9, 2024
1 parent a3e38c5 commit 669fa11
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ object FileLayerProvider {

},preservesPartitioning = true).groupByKey(partitioner).mapValues((tiles: Iterable[(Int, MultibandTile)]) => {
var mergedBands: Map[Int, Option[MultibandTile]] = tiles.groupBy(_._1).mapValues(_.map(_._2).reduceOption(_ merge _))
for (x <- 0 to expectedBandCount){
for (x <- 0 until expectedBandCount){
if(!mergedBands.contains(x)){
logger.warn("Band " + x + " is missing in the input data. Filling with empty tile.")
val someTile = mergedBands.head._2.get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@ class FileLayerProviderTest extends RasterMatchers{
val reference = GeoTiff.readMultiband("./load_regular_2023-04-05Z.tif").raster
val actual = GeoTiff.readMultiband("./load_per_product_2023-04-05Z.tif").raster

assertRastersEqual(reference,actual)
assertRastersEqual(actual,reference)

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SentinelXMLMetadataRasterSourceTest {
assertEquals( 171.800, source(0).read().get.tile.band(0).getDouble(0,0),0.001)
assertEquals( 65.707, source(1).read().get.tile.band(0).getDouble(0,0),0.001)
assertEquals( 251.333, source(2).read().get.tile.band(0).getDouble(0,0),0.001)
assertEquals(source.head.name.toString, path.toString + "_171")
assertEquals(source.head.name.toString, path.toString + "_171800")
GeoTiff(source.head.read().get, source.head.crs).write(outDir + "testReadAngles.tif")
}

Expand Down

0 comments on commit 669fa11

Please sign in to comment.