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

added test for map save #2365

Merged
merged 5 commits into from
Dec 17, 2017
Merged

added test for map save #2365

merged 5 commits into from
Dec 17, 2017

Conversation

himanshukgp
Copy link
Contributor

Closes #2303

@pep8speaks
Copy link

pep8speaks commented Dec 11, 2017

Hello @himanshukgp! Thanks for updating the PR.

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated on December 13, 2017 at 13:39 Hours UTC

Copy link
Member

@dpshelio dpshelio left a comment

Choose a reason for hiding this comment

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

Thanks @himanshukgp!!

afilename = tempfile.NamedTemporaryFile(suffix='fits').name
eitmap.save(afilename, filetype='fits', clobber=True)
backin = sunpy.map.Map(afilename)
assert isinstance(backin, sunpy.map.sources.EITMap)
Copy link
Member

Choose a reason for hiding this comment

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

adding some test to make sure the data and meta attributes survied the trip would be very valuable.

Copy link
Contributor

Choose a reason for hiding this comment

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

Like this?

@Cadair
Copy link
Member

Cadair commented Dec 13, 2017

Thanks @himanshukgp

@nabobalis nabobalis added map Affects the map submodule Tests Affects tests in some measure labels Dec 13, 2017
@nabobalis
Copy link
Contributor

I just added two extra asserts for the data and header.

@nabobalis
Copy link
Contributor

@himanshukgp Thanks for this! Sorry for getting a bits handsy on it, I was just thinking of adding this for our next release (0.8.3)!

@nabobalis nabobalis merged commit 9fe946e into sunpy:master Dec 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
map Affects the map submodule Tests Affects tests in some measure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants