def test_read_env_vars_and_defaults_ints_invalid_values(self):
        """Make sure a ConfigurationError is raised when the value cannot be parsed into an int."""
        for key, mock_real_environ, default_vars in [
            ("SOME_INT_VAR", {"SOME_INT_VAR": "not_an_int"}, dict()),
            ("SOME_INT_VAR", {"SOME_INT_VAR": '1.3'}, dict()),
            ("SOME_INT_VAR", dict(), {"SOME_INT_VAR": "not_an_int"}),
            ("SOME_INT_VAR", dict(), {"SOME_INT_VAR": "4.5"}),
        ]:
            mock_default_env_vars = mock.MagicMock()
            mock_default_env_vars.return_value = default_vars

            @mock.patch("marqo.api.configs.default_env_vars", mock_default_env_vars)
            @mock.patch.dict(os.environ, mock_real_environ)
            def run():
                with self.assertRaises(exceptions.ConfigurationError):
                    utils.read_env_vars_and_defaults_ints(var=key)
                return True

            assert run()
Make sure a ConfigurationError is raised when the value cannot be parsed into an int.
tests/integ_tests/tensor_search/test_utils.py