summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_datetime.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-02-01 02:54:15 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-02-01 02:54:15 (GMT)
commitb57f8f02bafcb74cd6c47f59f67d1b6bdfb33aec (patch)
tree839b9905e3dbb932b37585032356e035a5cfa2f4 /Lib/test/test_datetime.py
parent874d9bcbe5794539a4f6bc1ca46df7841b88f830 (diff)
downloadcpython-b57f8f02bafcb74cd6c47f59f67d1b6bdfb33aec.zip
cpython-b57f8f02bafcb74cd6c47f59f67d1b6bdfb33aec.tar.gz
cpython-b57f8f02bafcb74cd6c47f59f67d1b6bdfb33aec.tar.bz2
There's no good reason for datetime objects to expose __getstate__()
anymore either, so don't. This also allows to get rid of obscure code making __getnewargs__ identical to __getstate__ (hmm ... hope there wasn't more to this than I realize!).
Diffstat (limited to 'Lib/test/test_datetime.py')
-rw-r--r--Lib/test/test_datetime.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/Lib/test/test_datetime.py b/Lib/test/test_datetime.py
index 73db033..f383d7b 100644
--- a/Lib/test/test_datetime.py
+++ b/Lib/test/test_datetime.py
@@ -278,8 +278,6 @@ class TestTimeDelta(unittest.TestCase):
def test_pickling(self):
args = 12, 34, 56
orig = timedelta(*args)
- state = orig.__getstate__()
- self.assertEqual(args, state)
for pickler, unpickler, proto in pickle_choices:
green = pickler.dumps(orig, proto)
derived = unpickler.loads(green)
@@ -832,8 +830,6 @@ class TestDate(unittest.TestCase):
def test_pickling(self):
args = 6, 7, 23
orig = self.theclass(*args)
- state = orig.__getstate__()
- self.assertEqual(state, ('\x00\x06\x07\x17',), self.theclass)
for pickler, unpickler, proto in pickle_choices:
green = pickler.dumps(orig, proto)
derived = unpickler.loads(green)
@@ -1186,8 +1182,6 @@ class TestDateTime(TestDate):
def test_pickling(self):
args = 6, 7, 23, 20, 59, 1, 64**2
orig = self.theclass(*args)
- state = orig.__getstate__()
- self.assertEqual(state, ('\x00\x06\x07\x17\x14\x3b\x01\x00\x10\x00',))
for pickler, unpickler, proto in pickle_choices:
green = pickler.dumps(orig, proto)
derived = unpickler.loads(green)
@@ -1567,8 +1561,6 @@ class TestTime(unittest.TestCase):
def test_pickling(self):
args = 20, 59, 16, 64**2
orig = self.theclass(*args)
- state = orig.__getstate__()
- self.assertEqual(state, ('\x14\x3b\x10\x00\x10\x00',))
for pickler, unpickler, proto in pickle_choices:
green = pickler.dumps(orig, proto)
derived = unpickler.loads(green)
@@ -1877,8 +1869,6 @@ class TestTimeTZ(TestTime, TZInfoBase):
# Try one without a tzinfo.
args = 20, 59, 16, 64**2
orig = self.theclass(*args)
- state = orig.__getstate__()
- self.assertEqual(state, ('\x14\x3b\x10\x00\x10\x00',))
for pickler, unpickler, proto in pickle_choices:
green = pickler.dumps(orig, proto)
derived = unpickler.loads(green)
@@ -2080,8 +2070,6 @@ class TestDateTimeTZ(TestDateTime, TZInfoBase):
# Try one without a tzinfo.
args = 6, 7, 23, 20, 59, 1, 64**2
orig = self.theclass(*args)
- state = orig.__getstate__()
- self.assertEqual(state, ('\x00\x06\x07\x17\x14\x3b\x01\x00\x10\x00',))
for pickler, unpickler, proto in pickle_choices:
green = pickler.dumps(orig, proto)
derived = unpickler.loads(green)