mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Update datutil-2.8.2
This commit is contained in:
parent
439ca8ebb8
commit
3b645cf6c3
37 changed files with 16696 additions and 2664 deletions
22
lib/dateutil/test/property/test_parser_prop.py
Normal file
22
lib/dateutil/test/property/test_parser_prop.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
from hypothesis.strategies import integers
|
||||
from hypothesis import given
|
||||
|
||||
import pytest
|
||||
|
||||
from dateutil.parser import parserinfo
|
||||
|
||||
|
||||
@pytest.mark.parserinfo
|
||||
@given(integers(min_value=100, max_value=9999))
|
||||
def test_convertyear(n):
|
||||
assert n == parserinfo().convertyear(n)
|
||||
|
||||
|
||||
@pytest.mark.parserinfo
|
||||
@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
|
Loading…
Add table
Add a link
Reference in a new issue