-
Notifications
You must be signed in to change notification settings - Fork 28
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
Bugfix for source_detection's test_outputs #665
Bugfix for source_detection's test_outputs #665
Conversation
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #665 +/- ##
=======================================
Coverage 60.61% 60.61%
=======================================
Files 78 78
Lines 4113 4113
=======================================
Hits 2493 2493
Misses 1620 1620
*This pull request uses carry forward flags. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
looks good, thanks for the fix. i added the tmpdir just before i merged and forgot to re-run tests locally. |
just a thought - i could add an output directory arg, currently the catalog can only be output in the pwd. i originally didn't do this because i thought it would be confusing to have this in addition to the pipeline/step output_dir argument, but i think it makes sense to have this option |
I can confirm the same issue on my local machine:
This PR fixes this on Python 3.11 and Python 3.9 |
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.
LGTM
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.
LGTM
When I ran the unit tests locally, this test:
romancal/romancal/source_detection/tests/test_source_detection_step.py
Lines 159 to 185 in dec39b6
started failing the checks for the created file.
This was caused by the step not being run in the temporary directory created for the test. This left the file behind after the test finished and the test for the output file was with respect to this directory. This PR fixes this bug by using a context manager to temporarily change python's working directory to the test's temporary directory for the duration of the test.
The reason this was not caught by the CI in #608 is because this test is not run by the GitHub CI at this time due to the lack of a public CRDS server.
Checklist
CHANGES.rst
under the corresponding subsection