Skip to content

Commit 50cc4d9

Browse files
committed
Fix coverage from not including starlink in test suite anymore
1 parent 6a60d0a commit 50cc4d9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

galsim/table.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ def __call__(self, x, y, grid=False):
951951
Returns:
952952
a scalar value if x and y are scalar, or a numpy array if x and y are arrays.
953953
"""
954-
if np.__version__ >= "2.0":
954+
if np.__version__ >= "2.0": # pragma: no branch
955955
# I'm not sure if there is a simpler way to do this in 2.0.
956956
# We want a copy when edge_mode == wrap. Otherwise, only copy if dtype changes or
957957
# x,y aren't already arrays. That used to be simple...
@@ -1071,7 +1071,7 @@ def gradient(self, x, y, grid=False):
10711071
A tuple of (dfdx, dfdy) where dfdx, dfdy are single values (if x,y were single
10721072
values) or numpy arrays.
10731073
"""
1074-
if np.__version__ >= "2.0":
1074+
if np.__version__ >= "2.0": # pragma: no branch
10751075
copy = True if self.edge_mode=='wrap' else None
10761076
else:
10771077
copy = self.edge_mode=='wrap'

tests/test_fitsheader.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ def check_tpv(header):
7575
header = galsim.FitsHeader(file_name=file_name, dir=dir, hdu=0)
7676
check_tpv(header)
7777
check_pickle(header)
78+
# Can also pass the hdu itself.
79+
with pyfits.open(os.path.join(dir,file_name)) as hdu_list:
80+
header = galsim.FitsHeader(hdu_list=hdu_list[0])
81+
check_tpv(header)
82+
check_pickle(header)
7883
# If you pass in a pyfits Header object, that should also work
7984
with pyfits.open(os.path.join(dir,file_name)) as hdu_list:
8085
header = galsim.FitsHeader(header=hdu_list[0].header)

0 commit comments

Comments
 (0)