sot / kadi

Chandra commands and events
https://sot.github.io/kadi
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Fix, document, and test get_rltt and get_schedule_stop_time #307

Closed taldcroft closed 7 months ago

taldcroft commented 7 months ago

Description

Fix, document, and test CommandTable.get_rltt() and CommandTable.get_schedule_stop_time().

Fixes #306

This is based off of validate-finish-line so all tests pass, but could be rebased and merged into master if need be.

Interface impacts

Testing

Unit tests

I confirmed that get_rltt() is called many times in the testing so the coverage is good. The new test is the only time get_scheduled_stop_time gets covered.

(ska3-perf) ➜  kadi git:(fix-rltt-schedule-stop) git rev-parse HEAD
ead858540edf30ab55e4d127022e48f249e1af57
(ska3-perf) ➜  kadi git:(fix-rltt-schedule-stop) pytest     
==================================================== test session starts =====================================================
platform darwin -- Python 3.10.8, pytest-7.2.1, pluggy-1.0.0
rootdir: /Users/aldcroft/git, configfile: pytest.ini
plugins: timeout-2.1.0, anyio-3.6.2
collected 220 items                                                                                                          

kadi/commands/tests/test_commands.py ............................................................................      [ 34%]
kadi/commands/tests/test_states.py ......................x.............................................x.............. [ 72%]
.........                                                                                                              [ 76%]
kadi/commands/tests/test_validate.py ....................                                                              [ 85%]
kadi/tests/test_events.py ..........                                                                                   [ 90%]
kadi/tests/test_occweb.py ......................                                                                       [100%]

========================================= 218 passed, 2 xfailed in 91.65s (0:01:31) ==========================================

Independent check of unit tests by Jean with that conftest.py and with a ska3-masters environment and dev/local versions of chandra_aca, ska_sun, and chandra_maneuver in PYTHONPATH.

Functional tests

No functional testing.

jeanconn commented 7 months ago

And I think this one technically need to be either rebased off a rebased validate-finish-line or rebased off master.

taldcroft commented 7 months ago

And I think this one technically need to be either rebased off a rebased validate-finish-line or rebased off master.

I don't follow.

jeanconn commented 7 months ago

What environment should I be using to run the unit tests for the record? If it is the updated environment I need this branch rebased to technically get the missing conftest.py in here. If we don't care I can probably run tests against ska3-flight.

jeanconn commented 7 months ago

And fine, I can use the copied conftest here too for consistency before checking that unit test box.