summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_structseq.py
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2012-06-14 02:15:26 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2012-06-14 02:15:26 (GMT)
commitc142bba2a7ead80b99aef44b3dca06e2a4be4923 (patch)
tree9ead9517a479f4d9634014fd3d1f34e8b37cc9b5 /Lib/test/test_structseq.py
parentf6a899fe6d39b5447abc5966a3dfe386b9d6656e (diff)
downloadcpython-c142bba2a7ead80b99aef44b3dca06e2a4be4923.zip
cpython-c142bba2a7ead80b99aef44b3dca06e2a4be4923.tar.gz
cpython-c142bba2a7ead80b99aef44b3dca06e2a4be4923.tar.bz2
Issue #1667546: On platforms supporting tm_zone and tm_gmtoff fields
in struct tm, time.struct_time objects returned by time.gmtime(), time.localtime() and time.strptime() functions now have tm_zone and tm_gmtoff attributes. Original patch by Paul Boddie.
Diffstat (limited to 'Lib/test/test_structseq.py')
-rw-r--r--Lib/test/test_structseq.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_structseq.py b/Lib/test/test_structseq.py
index d6c63b7..a89e955 100644
--- a/Lib/test/test_structseq.py
+++ b/Lib/test/test_structseq.py
@@ -78,8 +78,9 @@ class StructSeqTest(unittest.TestCase):
def test_fields(self):
t = time.gmtime()
- self.assertEqual(len(t), t.n_fields)
- self.assertEqual(t.n_fields, t.n_sequence_fields+t.n_unnamed_fields)
+ self.assertEqual(len(t), t.n_sequence_fields)
+ self.assertEqual(t.n_unnamed_fields, 0)
+ self.assertEqual(t.n_fields, time._STRUCT_TM_ITEMS)
def test_constructor(self):
t = time.struct_time