Closed bngcebetsha closed 1 year ago
@bngcebetsha could you explain why casting the function output to bool fixes the testing issue?
@bngcebetsha could you explain why casting the function output to bool fixes the testing issue?
hi @lanceWilliams ,....the targets_visible
variable is of type bool
and for some slews in the test, targets_visible
is None
- which causes failures "cannot use + operator on NoneType" sort of error.
I tested out what the return value is if I do bool(None)
and the answer is False
....I think this is safe to do as True + False = True
.
Hi @bngcebetsha, why is targets_visible
None
? Let's see if we can rather fix that instead, instead of casting None
to False
...
Hi @bngcebetsha, why is
targets_visible
None
? Let's see if we can rather fix that instead, instead of castingNone
toFalse
...
@ludwigschwardt I agree, this is how I run the tests
python3 -m venv env
source env/bin/activate
pip install -e .
$ python -m unittest astrokat.test.test_scans
Yes the changes look Good
The function call to
reference_pointing_scan
was placed among the "scans" and led to a confusion in how many tracks of the target during callsreversescan
. We now move the check if the observation is "reference_pointing" to earlier in our logic.Reference pointing gives the expected telstateError result - http://10.8.67.104:8081/tailtask/20230206-0001/progress
Before fix
MASTER.txt
After fix
after_fix.txt
JIRA: MT-3289