diff --git a/jdaviz/configs/default/plugins/export/tests/test_export.py b/jdaviz/configs/default/plugins/export/tests/test_export.py index cde404ca80..094f6c2cb8 100644 --- a/jdaviz/configs/default/plugins/export/tests/test_export.py +++ b/jdaviz/configs/default/plugins/export/tests/test_export.py @@ -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): @@ -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 diff --git a/jdaviz/configs/default/plugins/subset_plugin/tests/test_subset_plugin.py b/jdaviz/configs/default/plugins/subset_plugin/tests/test_subset_plugin.py index 0f8a4c563b..bfc1b3b540 100644 --- a/jdaviz/configs/default/plugins/subset_plugin/tests/test_subset_plugin.py +++ b/jdaviz/configs/default/plugins/subset_plugin/tests/test_subset_plugin.py @@ -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'