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
Adds Test for TRACEMap #2504
Adds Test for TRACEMap #2504
Conversation
Hello @yashkgp! Thanks for updating the PR.
Comment last updated on March 07, 2018 at 18:30 Hours UTC |
|
||
def test_measurement(): | ||
"""Tests the measurement property of the TRACEMap object.""" | ||
assert int(trace.measurement) == 171 |
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.
does measurement not return a Quantity object? If I remember correctly it should. Is waveunit not set correctly for TRACE?
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.
No, @Cadair waveunit is been set to None
, and that's why measurement is returning a str
.
|
||
path = sunpy.data.test.rootdir | ||
fitspath = glob.glob(os.path.join(path, "tsi20010130_025823_a2.fits")) | ||
trace = Map(fitspath) |
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.
this should be a pytest fixture
Codecov Report
@@ Coverage Diff @@
## master #2504 +/- ##
=========================================
+ Coverage 76.34% 82.65% +6.3%
=========================================
Files 165 165
Lines 12717 12717
=========================================
+ Hits 9709 10511 +802
+ Misses 3008 2206 -802
Continue to review full report at Codecov.
|
also @yashkgp can you merge the sunpy master branch into this? |
import sunpy.data.test | ||
|
||
path = sunpy.data.test.rootdir | ||
fitspath = glob.glob(os.path.join(path, "tsi20010130_025823_a2.fits")) |
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.
Why do we need to use glob
in here?
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.
No . I think I forgot to remove it , while experimenting with the code .
@@ -0,0 +1,35 @@ | |||
import os | |||
import glob |
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.
You forgot to remove the import
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.
Sorry , My bad .
Fixes #1891