summaryrefslogtreecommitdiff
path: root/_test/test_datetime.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2017-01-18 09:32:22 +0100
committerAnthon van der Neut <anthon@mnt.org>2017-01-18 09:32:22 +0100
commit87a5ef4574e4cb666ab0752e729693ad1ab3d782 (patch)
tree89e81d64b84c355f4e1c912e6beb76a44315a3e9 /_test/test_datetime.py
parentf6fe5bcac3694c10e3300875398b1f94873dd091 (diff)
downloadruamel.yaml-87a5ef4574e4cb666ab0752e729693ad1ab3d782.tar.gz
fix deepcopy of TimeStamp, fix #91: crash if no compiler0.13.8
Diffstat (limited to '_test/test_datetime.py')
-rw-r--r--_test/test_datetime.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/_test/test_datetime.py b/_test/test_datetime.py
index 95f89d1..a33d368 100644
--- a/_test/test_datetime.py
+++ b/_test/test_datetime.py
@@ -19,6 +19,7 @@ Please note that a fraction can only be included if not equal to 0
"""
+import copy
import pytest # NOQA
import ruamel.yaml # NOQA
@@ -119,3 +120,11 @@ class TestDateTime:
round_trip("""
dt: 2016-08-19T22:45:47Z
""")
+
+ def test_deepcopy_datestring(self):
+ # reported by Quuxplusone, http://stackoverflow.com/a/41577841/1307905
+ x = dedent("""\
+ foo: 2016-10-12T12:34:56
+ """)
+ data = copy.deepcopy(round_trip_load(x))
+ assert round_trip_dump(data) == x