Skip to content

Commit

Permalink
fix docs test
Browse files Browse the repository at this point in the history
  • Loading branch information
haileyajohnson committed Oct 10, 2023
1 parent 9da78ee commit eb033c9
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,8 @@ public void testUnpackDataTutorial() throws IOException {
assertThat((Object) scaledvar).isNotNull();
assertThat(scaledvar.getDataType()).isEqualTo(DataType.FLOAT);

assertThat(scaledvar.attributes().hasAttribute("scale_factor")).isTrue();
double scale_factor = scaledvar.attributes().findAttributeDouble("scale_factor", 1.0);
assertThat(scaledvar.attributes().hasAttribute("add_offset")).isTrue();
double add_offset = scaledvar.attributes().findAttributeDouble("add_offset", 1.0);

double unpacked_data =
NetcdfDatasetTutorial.unpackData(scaledvar.readScalarShort(), scale_factor, add_offset);
NetcdfDatasetTutorial.unpackData(scaledvar.readScalarShort(), 1.0, 0.0);
assertThat(unpacked_data).isNotNaN();
}
}
Expand Down

0 comments on commit eb033c9

Please sign in to comment.