diff --git a/orangecontrib/spectroscopy/tests/test_preprocess.py b/orangecontrib/spectroscopy/tests/test_preprocess.py index 5abeb15e4..851e8cf9d 100644 --- a/orangecontrib/spectroscopy/tests/test_preprocess.py +++ b/orangecontrib/spectroscopy/tests/test_preprocess.py @@ -421,6 +421,15 @@ def test_no_attributes(self): for proc in PREPROCESSORS: _ = proc(data) + def test_one_attribute(self): + """ Preprocessors should not crash when samples have one attribute. """ + data = SMALL_COLLAGEN + data = data.transform(Orange.data.Domain([data.domain.attributes[0]], + class_vars=data.domain.class_vars, + metas=data.domain.metas)) + for proc in PREPROCESSORS: + _ = proc(data) + def test_all_nans(self): """ Preprocessors should not crash when there are all-nan samples. """ for proc in PREPROCESSORS: