-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test number of total sources and split up by publication. #73
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is testing the contents of the database and I think should be in a different test module. looking at SIMPLE, it makes sense to have one test module per table. So maybe this should be in test_sources.py
.
I think we should also check for the total number of sources. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Make a conftest.py
- in test_sources, also test total number of sources.
@@ -16,6 +16,9 @@ | |||
from astrodbkit2.astrodb import or_ | |||
import numpy as np | |||
|
|||
|
|||
###### now, we test database functionality, self-consistency, etc. ##### | |||
|
|||
def test_setup_db(db): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In SIMPLE, I use a conftest.py
to do these type of things.
db.Sources.c.reference == reference, | ||
|
||
) | ||
).astropy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might be able to use .count()
or similar instead of getting a table output
|
||
from sqlalchemy import and_, or_ | ||
import pytest | ||
from astropy.io.votable.ucd import check_ucd, parse_ucd, UCDWords |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of these imports are used
Move test_coordinates test from test_database into test_sources.py |
Addresses #54.
So far, I've tested the number of sources in the database and the number of sources that correspond to each publication. Anything else we want to add?