Skip to content

Commit

Permalink
scripts output and simplify kernel test
Browse files Browse the repository at this point in the history
  • Loading branch information
paverett committed Mar 18, 2024
1 parent 16bc69b commit 6d9d6ef
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
10 changes: 2 additions & 8 deletions astropy/convolution/tests/test_kernel_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,11 +641,5 @@ def test_array_keyword_not_allowed(self, kernel, opt):
Regression test for issue #10439
"""
x = np.ones([10, 10])
if len(opt) == 1:
a = opt[0]
with pytest.raises(TypeError, match=r".* allowed .*"):
kernel(a, array=x)
else:
a, b = opt
with pytest.raises(TypeError, match=r".* allowed .*"):
kernel(a, b, array=x)
with pytest.raises(TypeError, match=r".* allowed .*"):
kernel(*opt, array=x)
2 changes: 1 addition & 1 deletion astropy/io/fits/tests/test_fitscheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_version(self, capsys):
stdout, stderr = p.communicate()

assert p.returncode == 0
assert stdout.decode("utf-8") == f"fitscheck {version}\n"
assert stdout.decode("utf-8").strip() == f"fitscheck {version}"

def test_missing_file(self, capsys):
assert fitscheck.main(["missing.fits"]) == 1
Expand Down
2 changes: 1 addition & 1 deletion astropy/io/fits/tests/test_fitsdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_version(self, capsys):
stdout, stderr = p.communicate()

assert p.returncode == 0
assert stdout.decode("utf-8") == f"fitsdiff {version}\n"
assert stdout.decode("utf-8").strip() == f"fitsdiff {version}"

def test_noargs(self):
with pytest.raises(SystemExit) as e:
Expand Down
2 changes: 1 addition & 1 deletion astropy/io/fits/tests/test_fitsheader.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_version(self, capsys):
stdout, stderr = p.communicate()

assert p.returncode == 0
assert stdout.decode("utf-8") == f"fitsheader {version}\n"
assert stdout.decode("utf-8").strip() == f"fitsheader {version}"

def test_file_exists(self, capsys):
fitsheader.main([self.data("arange.fits")])
Expand Down
2 changes: 1 addition & 1 deletion astropy/io/fits/tests/test_fitsinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_version(self, capsys):
stdout, stderr = p.communicate()

assert p.returncode == 0
assert stdout.decode("utf-8") == f"fitsinfo {version}\n"
assert stdout.decode("utf-8").strip() == f"fitsinfo {version}"

def test_onefile(self, capsys):
fitsinfo.main([self.data("arange.fits")])
Expand Down

0 comments on commit 6d9d6ef

Please sign in to comment.