Skip to content

Commit

Permalink
Add in the npz files
Browse files Browse the repository at this point in the history
  • Loading branch information
jzuhone committed Jan 21, 2020
1 parent d4c40f9 commit f74060c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion spectral_cube/tests/setup_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

def get_package_data():
return {
_ASTROPY_PACKAGE_NAME_ + '.tests': ['coveragerc', 'data/*.fits', 'data/*.hdr', 'data/*.lmv', 'data/*reg']
_ASTROPY_PACKAGE_NAME_ + '.tests': ['coveragerc', 'data/*.fits', 'data/*.hdr',
'data/*.lmv', 'data/*reg', 'data/*.npz']
}
5 changes: 3 additions & 2 deletions spectral_cube/tests/test_spectral_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,7 @@ def test_yt_roundtrip_wcs(self):
self.cube = self.ytc1 = self.ytc2 = self.ytc3 = None

def test_yt_vr(self):
filepath = os.path.abspath(os.path.dirname(__file__))

ds = self.ytc1.dataset

Expand All @@ -868,7 +869,7 @@ def test_yt_vr(self):
cam.switch_orientation(normal_vector=direction)
cam.set_resolution(32)
im1 = sc.render()
im1_gold = np.load("yt_vr1.npz")
im1_gold = np.load(os.path.join(filepath, "data", "yt_vr1.npz"))
assert_array_equal(im1, im1_gold['arr_0'])

# Test movie
Expand All @@ -878,7 +879,7 @@ def test_yt_vr(self):
north_vector=(0.0, 1.0, 0.0),
run_ffmpeg=False)
im2 = np.array(im2)
im2_gold = np.load("yt_vr2.npz")
im2_gold = np.load(os.path.join(filepath, "data", "yt_vr2.npz"))
assert_array_equal(im2, im2_gold['arr_0'])


Expand Down

0 comments on commit f74060c

Please sign in to comment.