File: test_common.py

package info (click to toggle)
python-typepy 1.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 624 kB
  • sloc: python: 2,886; makefile: 78; sh: 7
file content (20 lines) | stat: -rw-r--r-- 594 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import pytest

from typepy._common import remove_thousand_sep


class Test_remove_thousand_sep:
    @pytest.mark.parametrize(
        ["value", "expected"],
        [
            ["1,000,000,000,000", "1000000000000"],
            ["100,000,000,000", "100000000000"],
            ["10,000,000,000", "10000000000"],
            ["9,999,999,999", "9999999999"],
            ["123,456,789", "123456789"],
            ["2021-01-23", "2021-01-23"],
            ["1,000.1", "1000.1"],
        ],
    )
    def test_normal(self, value, expected):
        assert remove_thousand_sep(value) == expected