Skip to content

Commit da0abfe

Browse files
pjonssonomad
authored andcommitted
tests: remove print statements
These print statements have been present for 5+ years during which time the tests have been properly debugged, so remove the print statements.
1 parent b5b054a commit da0abfe

File tree

7 files changed

+1
-19
lines changed

7 files changed

+1
-19
lines changed

integration_tests/test_eo3_support.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from collections import Counter
22
from datetime import datetime
33
from pathlib import Path
4-
from pprint import pprint
54
from textwrap import dedent
65
from uuid import UUID
76

@@ -75,8 +74,6 @@ def test_eo3_extents(eo3_index: Index) -> None:
7574
[dataset_extent_row] = _extents.get_sample_dataset(
7675
[product], explorer_index(eo3_index)
7776
)
78-
pprint(dataset_extent_row)
79-
8077
assert dataset_extent_row["id"] == UUID("5b2f2c50-e618-4bef-ba1f-3d436d9aed14")
8178

8279
# On older products, the center time was calculated from the range.
@@ -140,8 +137,6 @@ def test_eo3_dateless_extents(eo3_index: Index) -> None:
140137
[dataset_extent_row] = _extents.get_sample_dataset(
141138
[product], explorer_index(eo3_index)
142139
)
143-
pprint(dataset_extent_row)
144-
145140
assert dataset_extent_row["id"] == UUID("856e45bf-cd50-5a5a-b1cd-12b85df99b24")
146141

147142
# Since it has no datetime, the chosen one should default to the start

integration_tests/test_page_loads.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Tests that load pages and check the contained text.
33
"""
44

5-
import json
65
from datetime import datetime, timezone
76
from io import StringIO
87

@@ -567,7 +566,6 @@ def test_api_returns_limited_tile_regions(client: FlaskClient) -> None:
567566
geojson = get_geojson(client, "/api/regions/ga_ls8c_ard_3/2022/02")
568567
assert len(geojson["features"]) == 3, "Unexpected region month count"
569568
geojson = get_geojson(client, "/api/regions/ga_ls8c_ard_3/2022/02/26")
570-
print(json.dumps(geojson, indent=4))
571569
assert len(geojson["features"]) == 1, "Unexpected region day count"
572570
geojson = get_geojson(client, "/api/regions/ga_ls8c_ard_3/2022/04/6")
573571
assert len(geojson["features"]) == 0, "Unexpected region count"
@@ -799,7 +797,6 @@ def test_show_summary_cli(clirunner, client: FlaskClient) -> None:
799797
"""
800798
# ls7_nbar_scene, 2017, May
801799
res: Result = clirunner(show.cli, ["ls7_nbar_scene", "2017", "5"])
802-
print(res.output)
803800

804801
# Expect it to show the dates in local timezone.
805802
expected_from = datetime(2017, 4, 20, 0, 3, 26, tzinfo=tz.tzutc())

integration_tests/test_region_tiles.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ def test_archived_dataset_is_excluded(client, run_generate, odc_test_db) -> None
9292
odc_test_db.index.datasets.archive(["974e1e89-3757-4d94-be8d-7acaeb7adf24"])
9393

9494
# ... the next generation should catch it and update with one less dataset....
95-
result = run_generate("ga_ls_wo_fq_nov_mar_3")
96-
print(result)
95+
_ = run_generate("ga_ls_wo_fq_nov_mar_3")
9796

9897
rv = client.get("product/ga_ls_wo_fq_nov_mar_3/regions/x25y41")
9998
assert rv.status_code == 404, rv.data

integration_tests/test_s2_l2a_footprint.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ def test_product_audit(unpopulated_client: FlaskClient, run_generate) -> None:
6161
client = unpopulated_client
6262

6363
res = get_html(client, "/product-audit/")
64-
# print(res.html)
65-
6664
assert (
6765
res.css_first(".unavailable-metadata .search-result .product-name").text(
6866
strip=True

integration_tests/test_stac.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,6 @@ def test_stac_links(stac_client: FlaskClient) -> None:
604604
href: str = child_link["href"]
605605
# ignore child links corresponding to catalogs
606606
if "catalogs" not in href:
607-
print(f"Loading collection page for {product_name}: {href!r}")
608-
609607
collection_data = get_collection(stac_client, href, validate=True)
610608
assert collection_data["id"] == product_name
611609
# TODO: assert items, properties, etc.

integration_tests/test_summarise_data.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ def test_dataset_changing_product(run_generate, summary_store: SummaryStore) ->
219219
assert dataset.product.name == "ga_ls8c_ard_3"
220220

221221
# Explorer should remove it too.
222-
print(f"Test dataset: {dataset_id}")
223222
# TODO: Make this work without a force-refresh.
224223
# It's hard because we're scanning for updated datasets in the product...
225224
# but it's not in the product. And the incremental updater misses it.
@@ -288,7 +287,6 @@ def test_has_source_derived_product_links(
288287
ls8_ard = summary_store.get_product_summary("ga_ls8c_ard_3")
289288
assert ls8_ard is not None
290289

291-
print(repr([ls_fc_pc, ls_fc, ls8_ard]))
292290
assert ls_fc_pc.source_products == ["ga_ls_fc_3"]
293291
assert ls_fc_pc.derived_products == []
294292

integration_tests/test_wagl_data.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ def test_product_audit(unpopulated_client: FlaskClient, run_generate) -> None:
6565
client = unpopulated_client
6666

6767
res = get_html(client, "/product-audit/?timings")
68-
# print(res.html)
69-
7068
largest_footprint_size = res.css(".footprint-size .search-result")
7169
assert len(largest_footprint_size) == 2
7270

@@ -82,5 +80,4 @@ def test_product_audit(unpopulated_client: FlaskClient, run_generate) -> None:
8280

8381
res = client.get("/audit/day-query-times.txt")
8482
plain_timing_results = res.data.decode("utf-8")
85-
print(plain_timing_results)
8683
assert '"s2a_ard_granule"\t8\t' in plain_timing_results

0 commit comments

Comments
 (0)