Get last_updated supplement table without error#190
Conversation
taldcroft
left a comment
There was a problem hiding this comment.
Looks good. Please always document your testing with the git rev-parse HEAD output and a copy/paste of the pytest results along with any custom setup. It's a slight hassle but otherwise there is no record of which version was tested.
|
|
||
| def test_last_updated(): | ||
| last_updated = agasc.get_supplement_table("last_updated") | ||
| assert CxoTime(last_updated["supplement"]).date.startswith("20") |
There was a problem hiding this comment.
I see that there is no other testing of these supplement tables. So while you are at it, it would be worth testing:
last_updatedhas the correct four keys- Each corresponding value is a string that is a valid ISO format date
CxoTime(last_updated[key], format="iso"). agasc_versionshas the same four keys.
The name of the test function does not quite match what it does.
There was a problem hiding this comment.
I think I addressed this comment in my last commit.
|
@javierggt - is this PR overtaken by #203 or events? |
2cd4ddc to
40b033a
Compare
40b033a to
fc21dc7
Compare
No. It's still valid. I added some text to the functional test description so you can check. My guess is that this PR stalled after you asked for further changes. I made those changes now, so this should be good. |
Description
This PR fixes an exception that happens when one does
agasc.get_supplement_table("last_updated")without specifyingas_dict=True. Specifyingas_dict=Trueis not intuitive and not expected, and anywaylast_updatedandagasc_versionsare always better as dicts.Interface impacts
Testing
Unit tests
Added a unit test for this and checked that it fails on master as expected.
Independent check of unit tests by [REVIEWER NAME]
Functional tests
You can quickly check this by running the following code. It should fail on master and succeed the branch:
and