Skip to content

Commit

Permalink
removed extraneous tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rstrub committed Dec 6, 2023
1 parent 5880661 commit a61435f
Showing 1 changed file with 5 additions and 34 deletions.
39 changes: 5 additions & 34 deletions hermes_eea/tests/test_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@ def test_calibrate_file(small_level0_file):
assert os.path.basename(output_file) == "hermes_eea_l1_20000101T170901_v1.0.0.cdf"
assert os.path.getsize(output_file) > 200000

# this creates a blank cdf with the proper name -- not too interesting
def not_test_l0_sci_data_to_cdf(level0_file):
"""Test that the output filenames are correct and that a file was actually created."""
data = {}
output_file = calib.l0_sci_data_to_cdf(data, level0_file)
# assert output_file.name == level1_filename
assert output_file.is_file()


# This drops all the way down to ccsdspy but seems to work
Expand All @@ -72,41 +65,19 @@ def test_process_file_nofile_error():
calib.process_file(files)


# this fills the blank cdf with data
def not_test_calibrate_file(level0_file, level1a_filename):
"""Test that the output filenames are correct and that a file was actually created."""
output_file = calib.calibrate_file(level0_file)
# assert output_file.name == level1_filename
assert output_file.is_file()
output_file = calib.calibrate_file(level1_file)
assert output_file.name == ql_filename
assert output_file.is_file()

# with pytest.raises(ValueError) as excinfo:
# calib.calibrate_file("datafile_with_no_calib.cdf")
# assert (
# str(excinfo.value)
# == "Calibration file for datafile_with_no_calib.cdf not found."
# )

# this also populates the file with data..duplicate of test_calibrate_file

# this processes more than one file
def test_process_file_level0(large_level0_file,small_level0_file):
"""Test that the output filenames are correct and that a file was actually created."""

output_files = calib.process_file([large_level0_file, small_level0_file])
output_files = calib.process_file(
[large_level0_file, small_level0_file]
)
assert os.path.basename(output_files[0]) == "hermes_eea_l1_20000101T124114_v1.0.0.cdf"
assert os.path.basename(output_files[1]) == "hermes_eea_l1_20000101T170901_v1.0.0.cdf"
assert os.path.getsize(output_files[0]) == 266568541
assert os.path.getsize(output_files[1]) == 275299

# this populates a level 1, a different file but doesn't really, now it is just a stub
def not_test_process_file_level1(level1_file):
"""Test that the output filenames are correct and that a file was actually created."""
file_output = calib.process_file(level1_file)
assert len(file_output) == 1
assert file_output[0].name == ql_filename
assert file_output[0].is_file()




0 comments on commit a61435f

Please sign in to comment.