test(fix): remove commented out text #176
GitHub Actions / Test Results (3.11)
failed
Aug 12, 2024 in 0s
19 passed, 1 failed and 0 skipped
❌ test-results.xml
20 tests were completed in 14s with 19 passed, 1 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
pytest | 19✅ | 1❌ | 14s |
❌ pytest
tests.test_database
✅ test_database_output_manager_writes_to_database
✅ test_database_output_manager_errors_destination_file_not_found
✅ test_database_output_manager_errors_destination_file_different_hash
✅ test_database_output_manager_errors_database_error
tests.test_fetchBinary
✅ test_fetch_binary_empty_download_not_added_to_output
✅ test_fetch_binary_with_same_start_end_date
tests.test_fetchScience
✅ test_fetch_science_no_matching_files
✅ test_fetch_science_with_same_start_end_date
tests.test_main
✅ test_app_says_hello
✅ test_process_with_valid_config_does_not_error
✅ test_process_with_binary_hk_converts_to_csv
✅ test_fetch_binary_downloads_hk_from_webpoda
❌ test_fetch_science_downloads_cdf_from_sdc
wiremock_manager = <tests.wiremockUtils.WireMockManager object at 0x7f45d1beb710>
✅ test_calibration_creates_calibration_file
✅ test_application_creates_L2_file
tests.test_outputManager
✅ test_copy_new_file
✅ test_copy_file_same_content
✅ test_copy_file_existing_versions
✅ test_copy_file_forced_version
✅ test_copy_file_custom_providers
Annotations
Check failure on line 0 in test-results.xml
github-actions / Test Results (3.11)
pytest ► tests.test_main ► test_fetch_science_downloads_cdf_from_sdc
Failed test found in:
test-results.xml
Error:
wiremock_manager = <tests.wiremockUtils.WireMockManager object at 0x7f45d1beb710>
Raw output
wiremock_manager = <tests.wiremockUtils.WireMockManager object at 0x7f45d1beb710>
def test_fetch_science_downloads_cdf_from_sdc(wiremock_manager): # noqa: F811
# Set up.
query_response: list[dict[str, str]] = [
{
"file_path": "imap/mag/l1b/2025/05/imap_mag_l1b_norm-magi_20250502_v000.cdf",
"instrument": "mag",
"data_level": "l1b",
"descriptor": "norm-magi",
"start_date": "20250502",
"repointing": None,
"version": "v000",
"extension": "cdf",
"ingestion_date": "2024-07-16 10:29:02",
}
]
cdf_file = os.path.abspath(
"tests/data/2025/imap_mag_l1b_norm-mago_20250502_v000.cdf"
)
wiremock_manager.add_string_mapping(
"/query?instrument=mag&data_level=l1b&descriptor=norm-magi&start_date=20250502&end_date=20250502&extension=cdf",
json.dumps(query_response),
priority=1,
)
wiremock_manager.add_file_mapping(
"/download/imap/mag/l1b/2025/05/imap_mag_l1b_norm-magi_20250502_v000.cdf",
cdf_file,
)
wiremock_manager.add_string_mapping(
re.escape("/query?instrument=mag&data_level=l1b&descriptor=")
+ ".*"
+ re.escape("&start_date=20250502&end_date=20250502&extension=cdf"),
json.dumps({}),
is_pattern=True,
priority=2,
)
(_, config_file) = create_serialize_config(
destination_file="result.cdf", sdc_url=wiremock_manager.get_url().rstrip("/")
)
# Exercise.
result = runner.invoke(
app,
[
"--verbose",
"fetch-science",
"--config",
config_file,
"--auth-code",
"12345",
"--level",
"l1b",
"--start-date",
"2025-05-02",
"--end-date",
"2025-05-02",
],
)
print("\n" + str(result.stdout))
# Verify.
> assert result.exit_code == 0
E AssertionError: assert 1 == 0
E + where 1 = <Result ValueError('max() arg is an empty sequence')>.exit_code
tests/test_main.py:181: AssertionError
Loading