Skip to content

Commit 07d1839

Browse files
committed
small tweaks to future proof tests
1 parent eb9f4ff commit 07d1839

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

tests/test_simsetup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,6 +1915,10 @@ def test_beamlist_init(rename_beamfits, pass_beam_type, tmp_path):
19151915
beam_file = beamfits_file
19161916
telconfig["beam_paths"][0] = {"filename": beam_file, "file_type": "beamfits"}
19171917

1918+
# always do this once we require pyuvdata >= 3.2
1919+
if hasattr(Telescope(), "mount_type"):
1920+
telconfig["beam_paths"][0]["mount_type"] = "fixed"
1921+
19181922
telconfig["beam_paths"][6]["filename"] = os.path.join(
19191923
UV_DATA_PATH, "mwa_full_EE_test.h5"
19201924
)
@@ -1930,10 +1934,6 @@ def test_beamlist_init(rename_beamfits, pass_beam_type, tmp_path):
19301934
"error in version 1.6"
19311935
] * entries_warnings
19321936

1933-
# always do this once we require pyuvdata >= 3.2
1934-
if hasattr(Telescope(), "mount_type"):
1935-
warn_list.append("The mount_type parameter must be set for UVBeam objects")
1936-
19371937
warn_types = DeprecationWarning
19381938

19391939
Nfreqs = 10

tests/test_uvsim.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@
4343

4444
def multi_beams():
4545
beam0 = UVBeam()
46-
beam0.read_beamfits(herabeam_default)
46+
# always do this once we require pyuvdata >= 3.2
47+
if hasattr(UVData().telescope, "mount_type"):
48+
beam0.read(herabeam_default, mount_type="fixed")
49+
else:
50+
beam0.read(herabeam_default)
4751
beam0.extra_keywords["beam_path"] = herabeam_default
4852
beam0.peak_normalize()
4953

0 commit comments

Comments
 (0)