-
Notifications
You must be signed in to change notification settings - Fork 49
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
Reduce pocs test redundancy (and fix camera simulator) #681
Conversation
* Using simulator file for tests so we are not constantly loading a bunch of targets * Lots of shortening of tests so we are not constantly recreateing the POCS instance when we don't need to
…e-pocs-test-redundancy
pocs/camera/simulator.py
Outdated
|
||
# If POCSTIME is set for testing then the simulator will generate | ||
# duplicate filenames each time so we pass a filename here. Full path | ||
# is added in `camera._setup_obseravtion`. |
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.
Typo in _setup_obseravtion
pocs/tests/conftest.py
Outdated
pocs.base.reset_global_config() | ||
|
||
global _one_time_config | ||
if not _one_time_config: | ||
_one_time_config = load_config(ignore_local=True, simulator=['all']) | ||
_one_time_config['db']['name'] = 'panoptes_testing' | ||
_one_time_config['directories']['images'] = images_dir |
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.
Will this line execute often enough? Or should it indented less?
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.
Would that be true of the db as well? Or because that is a global is it fine anyway?
Codecov Report
@@ Coverage Diff @@
## develop #681 +/- ##
===========================================
+ Coverage 77.98% 77.99% +0.01%
===========================================
Files 61 61
Lines 5065 5068 +3
Branches 696 696
===========================================
+ Hits 3950 3953 +3
Misses 900 900
Partials 215 215
Continue to review full report at Codecov.
|
@jamessynge this dropped covered on the astrohaven dome in an unexpected way. Can you maybe look over the coverage report before I merge to see if you have any concerns? Thanks! Edit: I added two lines to the dome tests and increased coverage instead. :) |
…e-pocs-test-redundancy
`error.InvalidObservation`.
This changes and fixes a few things related to testing and the simulators:
simulator.yaml
targets file. We spend a lot of time loading the targets, especially in test_observatory.py. This reduces that a lot.