Skip to content

Commit daaf809

Browse files
committed
add test files
1 parent 8bf45b9 commit daaf809

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

tests/test_data.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ def reference_verifier(t, name, bibcode, doi):
1818
def test_sources(db):
1919
# Test to verify existing counts of sources and names
2020
n_sources = db.query(db.Sources).count()
21-
assert n_sources == 3619, f"found {n_sources} sources"
21+
assert n_sources == 3633, f"found {n_sources} sources"
2222

2323
n_names = db.query(db.Names).count()
24-
assert n_names == 12203, f"found {n_names} names"
24+
assert n_names == 12217, f"found {n_names} names"
2525

2626

2727

@@ -450,7 +450,10 @@ def test_suar22_ingest(db):
450450
[
451451
("Roja12", 1),
452452
("Burg24", 1),
453-
("Zhan18.2054", 32),
453+
("Zhan17.3040", 5),
454+
("Zhan17", 1),
455+
("Zhan18.1352", 2),
456+
("Zhan18.2054", 46),
454457
("Lodi17", 28),
455458
("Lupi08", 6),
456459
],

tests/test_data_spectra.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
def test_spectra_count(db):
66
n_spectra = db.query(db.Spectra).count()
7-
assert n_spectra == 1608, f"found {n_spectra} sources"
7+
assert n_spectra == 1728, f"found {n_spectra} sources"
88

99

1010
@pytest.mark.parametrize(
1111
("regime", "n_spectra"),
1212
[
13-
("optical", 744),
14-
("nir", 637),
13+
("optical", 838),
14+
("nir", 663),
1515
("mir", 227),
1616
("unknown", 0),
1717
],
@@ -27,14 +27,16 @@ def test_spectra_regimes(db, regime, n_spectra):
2727
("IRTF", 457),
2828
("Keck I", 65),
2929
("Keck II", 8),
30-
("Magellan I Baade", 9),
30+
("Magellan I Baade", 12),
3131
("Magellan II Clay", 11),
3232
("SOAR", 2),
3333
("Lick Shane 3m", 1),
3434
("HST", 77),
3535
("Gemini North", 27),
3636
("Gemini South", 34),
37-
("ESO VLT", 62),
37+
("GTC", 67),
38+
("ESO VLT", 114),
39+
("SDSS", 1),
3840
("Spitzer", 203),
3941
("KPNO 2.1m", 93),
4042
("KPNO 4m", 251),
@@ -52,6 +54,11 @@ def test_spectra_telescope(db, telescope, n_spectra):
5254
("JWST", "NIRSpec", 25),
5355
("JWST", "MIRI", 24),
5456
("HST", "WFC3", 77),
57+
("ESO VLT", "XShooter", 88),
58+
("GTC", "OSIRIS", 66),
59+
("Magellan I Baade", "IMACS", 1),
60+
("Magellan I Baade", "FIRE", 11),
61+
("SDSS", "BOSS", 1),
5562
],
5663
)
5764
def test_spectra_instrument(db, telescope, instrument, n_spectra):
@@ -79,6 +86,10 @@ def test_spectra_instrument(db, telescope, instrument, n_spectra):
7986
("Burg10.1142", 46),
8087
("Manj20", 20),
8188
("Roth24", 34),
89+
("Zhan17.3040", 19),
90+
("Zhan17", 4),
91+
("Zhan18.1352", 14),
92+
("Zhan18.2054", 83),
8293
],
8394
)
8495
def test_spectra_references(db, ref, n_spectra):

0 commit comments

Comments
 (0)