diff options
| author | Alexander Smirnov <[email protected]> | 2024-03-18 09:45:29 +0000 |
|---|---|---|
| committer | Alexander Smirnov <[email protected]> | 2024-03-18 09:45:29 +0000 |
| commit | 5ff3b38fce49645bcb7bc2f63cfc22475ead6c09 (patch) | |
| tree | 81728bf248a00ec69169aed99ad92d3b7fb35e2f /contrib/python/python-dateutil/py3/tests/property/test_parser_prop.py | |
| parent | f714ab41ab9eff2692f35f7f003562d42b21f89c (diff) | |
| parent | d7c2d188d2464ce858465870a39220c4dfbb5509 (diff) | |
Merge branch 'rightlib' into mergelibs-240318-0944
Diffstat (limited to 'contrib/python/python-dateutil/py3/tests/property/test_parser_prop.py')
| -rw-r--r-- | contrib/python/python-dateutil/py3/tests/property/test_parser_prop.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/python/python-dateutil/py3/tests/property/test_parser_prop.py b/contrib/python/python-dateutil/py3/tests/property/test_parser_prop.py new file mode 100644 index 00000000000..fdfd171e867 --- /dev/null +++ b/contrib/python/python-dateutil/py3/tests/property/test_parser_prop.py @@ -0,0 +1,22 @@ +from hypothesis.strategies import integers +from hypothesis import given + +import pytest + +from dateutil.parser import parserinfo + + +@given(integers(min_value=100, max_value=9999)) +def test_convertyear(n): + assert n == parserinfo().convertyear(n) + + +@given(integers(min_value=-50, + max_value=49)) +def test_convertyear_no_specified_century(n): + p = parserinfo() + new_year = p._year + n + result = p.convertyear(new_year % 100, century_specified=False) + assert result == new_year |
