Skip to content

Commit

Permalink
added monkeypatch to temporarily change _config.DECIMAL_POINT
Browse files Browse the repository at this point in the history
Co-authored-by: crnh <30109443+crnh@users.noreply.github.com>
  • Loading branch information
LucVV and crnh authored Jul 25, 2023
1 parent a1fa854 commit e89a4ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/analyses/test_polarization.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand Down

0 comments on commit e89a4ce

Please sign in to comment.