Skip to content
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

Fix esasky remote tests #2672

Merged
merged 1 commit into from
Feb 21, 2023
Merged

Fix esasky remote tests #2672

merged 1 commit into from
Feb 21, 2023

Conversation

eerovaher
Copy link
Member

The two reasons the tests were failing were not using uppercase filenames for file existence checks where needed and not closing HDULists.

Contributes towards #2634

@codecov
Copy link

codecov bot commented Feb 17, 2023

Codecov Report

Merging #2672 (8644ab7) into main (c293417) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2672   +/-   ##
=======================================
  Coverage   69.17%   69.17%           
=======================================
  Files         304      304           
  Lines       22524    22524           
=======================================
  Hits        15580    15580           
  Misses       6944     6944           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Comment on lines 121 to 123
result = ESASky.get_images(
position="M51", missions=mission, download_dir=tmp_path
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep these long, we use line length 120.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've merged the line triplets.

Comment on lines +88 to +89
for hdu_list in result[mission.upper()]:
hdu_list.close()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I wonder whether this should rather be dealt with by a context manager somewhere in the module instead, but I suppose getting a workaround in the test would do for now.

The two reasons the tests were failing were not using uppercase
filenames for file existence checks where needed and not closing
HDULists.
@bsipocz bsipocz added this to the v0.4.7 milestone Feb 21, 2023
@bsipocz bsipocz merged commit e388ceb into astropy:main Feb 21, 2023
@bsipocz
Copy link
Member

bsipocz commented Feb 21, 2023

Thanks @eerovaher!

@eerovaher eerovaher deleted the fix-esasky-tests branch February 22, 2023 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants