Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Nov 8, 2024
1 parent 2cdeba4 commit 9fdb1af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions jdaviz/configs/default/plugins/export/tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_basic_export_subsets_imviz(self, imviz_helper):

# test that invalid file extension raises an error
with pytest.raises(ValueError,
match=re.escape("x not one of ['fits', 'reg', 'ecsv'], reverting selection to reg")): # noqa
match=re.escape("'x' not one of ['fits', 'reg', 'ecsv'], reverting selection to reg")): # noqa
export_plugin.subset_format.selected = 'x'

def test_not_implemented(self, cubeviz_helper, spectral_cube_wcs):
Expand Down Expand Up @@ -180,7 +180,7 @@ def test_basic_export_subsets_cubeviz(self, cubeviz_helper, spectral_cube_wcs):

# test that invalid file extension raises an error
with pytest.raises(ValueError,
match=re.escape("x not one of ['fits', 'reg', 'ecsv'], reverting selection to reg")): # noqa
match=re.escape("'x' not one of ['fits', 'reg', 'ecsv'], reverting selection to reg")): # noqa
export_plugin.subset_format.selected = 'x'

# Test that selecting disabled option raises an error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,5 +224,5 @@ def test_import_spectral_regions_file(cubeviz_helper, spectrum1d_cube, tmp_path)

assert cubeviz_helper.app.session.edit_subset_mode.mode == OrMode

with pytest.raises(ValueError, match='test not one of'):
with pytest.raises(ValueError, match='\'test\' not one of'):
plg.combination_mode.selected = 'test'

0 comments on commit 9fdb1af

Please sign in to comment.