def test_Gustometer_set_mode(self):
        self.g = Gustometer(use_threads=False, test_mode=True)

        self.g.set_mode('edit')
        assert self.g._mode == 'edit'

        self.g.set_mode('experiment')
        assert self.g._mode == 'experiment'

        self.g.set_mode('exp')
        assert self.g._mode == 'experiment'

        with pytest.raises(ValueError):
            self.g.set_mode('foobar')
 def test_Gustometer_without_threads(self):
     self.g = Gustometer(use_threads=False, test_mode=True)
     self._test()