From e89a4cec0e89e969d5ee32b35eed4f92d95d2541 Mon Sep 17 00:00:00 2001 From: Luc van Vught <31657810+LucVV@users.noreply.github.com> Date: Tue, 25 Jul 2023 14:15:07 +0200 Subject: [PATCH] added monkeypatch to temporarily change _config.DECIMAL_POINT Co-authored-by: crnh <30109443+crnh@users.noreply.github.com> --- tests/analyses/test_polarization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/analyses/test_polarization.py b/tests/analyses/test_polarization.py index de78ff1..ba014a6 100644 --- a/tests/analyses/test_polarization.py +++ b/tests/analyses/test_polarization.py @@ -41,7 +41,7 @@ def test_get_number_field_returns_correct_result_for_integers(self, number_strin def test_get_number_field_returns_correct_result_for_floats(self, number_string, decimal_separator): original_decimal_point = _config.DECIMAL_POINT # store original decimal separator to revert later if decimal_separator is not None: - _config.DECIMAL_POINT = decimal_separator # adjust configured decimal point separator + monkeypatch.setattr(_config, "DECIMAL_POINT", decimal_separator) res = _get_number_field("Test", f"Test: {number_string}")