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

[((9, 11, 9, 45), 'janitor.utils._clean_accounting_column', '_clean_accounting_column', ({(9, 36, 9, 44): 'test_str'}, {}), '(test_str)', False, 'from janitor.utils import _clean_accounting_column\n'), ((15, 11, 15, 45), 'janitor.utils._clean_accounting_column', '_clean_accounting_column', ({(15, 36, 15, 44): 'test_str'}, {}), '(test_str)', False, 'from janitor.utils import _clean_accounting_column\n')]