diff options
author | Paul Ganssle <paul@ganssle.io> | 2018-11-13 00:42:33 -0500 |
---|---|---|
committer | Paul Ganssle <paul@ganssle.io> | 2018-11-13 00:43:04 -0500 |
commit | 107f6e33a9f4b83d319b7f1fc2cce469369ebf0c (patch) | |
tree | 7ca6dfe09aaad2581387f6d0b683801f3d727c32 | |
parent | fc984642eb2c48a78c2506b0d8b446a2a061f1ab (diff) | |
download | dateutil-107f6e33a9f4b83d319b7f1fc2cce469369ebf0c.tar.gz |
Test error condition in _DatetimeWithFold.replace
-rw-r--r-- | dateutil/test/test_tz.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/dateutil/test/test_tz.py b/dateutil/test/test_tz.py index 362bd78..4046392 100644 --- a/dateutil/test/test_tz.py +++ b/dateutil/test/test_tz.py @@ -2661,6 +2661,12 @@ class TestEnfold: assert dt2 == tz.enfold(datetime(1952, 2, 3, 13, 31, 16, 9), fold=1) assert dt2.fold == 1 + def test_fold_replace_exception_duplicate_args(self): + dt = tz.enfold(datetime(1999, 1, 3), fold=1) + + with pytest.raises(TypeError): + dt.replace(1950, year=2000) + @pytest.mark.tz_resolve_imaginary class ImaginaryDateTest(unittest.TestCase): |