Skip to content

Commit

Permalink
tqdm and number of broken spectra
Browse files Browse the repository at this point in the history
  • Loading branch information
kelle authored Oct 17, 2023
1 parent 08a573c commit 670c1fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/scheduled_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import pytest
import sys
import requests
from tqdm import tqdm
from astrodbkit2.astrodb import create_database, Database
from scripts.ingests.utils import check_internet_connection

Expand Down Expand Up @@ -53,7 +54,7 @@ def test_spectra_urls(db):
codes = []
internet = check_internet_connection()
if internet:
for spectrum_url in spectra_urls["spectrum"]:
for spectrum_url in tqdm(spectra_urls["spectrum"]):
request_response = requests.head(spectrum_url)
status_code = request_response.status_code
# The website is up if the status code is 200
Expand All @@ -62,5 +63,5 @@ def test_spectra_urls(db):
broken_urls.append(spectrum_url)
codes.append(status_code)
assert (
len(broken_urls) == 149
len(broken_urls) == 150
), f"found {len(broken_urls)} broken spectra urls: {broken_urls}, {codes}"

0 comments on commit 670c1fd

Please sign in to comment.