summaryrefslogtreecommitdiff
path: root/_test/test_datetime.py
diff options
context:
space:
mode:
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