import pytest

from janitor.utils import _clean_accounting_column


@pytest.mark.utils
def test_clean_accounting_column():
    test_str = "(1,000)"
    assert _clean_accounting_column(test_str) == float(-1000)


@pytest.mark.utils
def test_clean_accounting_column_zeroes():
    test_str = "()"
    assert _clean_accounting_column(test_str) == 0.00

[((159, 193), 'janitor.utils._clean_accounting_column', '_clean_accounting_column', (['test_str'], {}), '(test_str)\n', (183, 193), False, 'from janitor.utils import _clean_accounting_column\n'), ((305, 339), 'janitor.utils._clean_accounting_column', '_clean_accounting_column', (['test_str'], {}), '(test_str)\n', (329, 339), False, 'from janitor.utils import _clean_accounting_column\n')]