SF.net SVN: jython:[7148] trunk/jython

[email protected] Sat, 16 Oct 2010 03:04:21 +0000
Newsgroups gmane.comp.lang.jython.cvs
Message-ID <[email protected]>
Revision: 7148
          http://jython.svn.sourceforge.net/jython/?rev=7148&view=rev
Author:   zyasoft
Date:     2010-10-16 03:04:21 +0000 (Sat, 16 Oct 2010)

Log Message:
-----------
Added test for #1662 re strptime properly quoting ending literals.

Modified Paths:
--------------
    trunk/jython/NEWS

Added Paths:
-----------
    trunk/jython/Lib/test/test_strptime_jy.py

Added: trunk/jython/Lib/test/test_strptime_jy.py
===================================================================
--- trunk/jython/Lib/test/test_strptime_jy.py	                        (rev 0)
+++ trunk/jython/Lib/test/test_strptime_jy.py	2010-10-16 03:04:21 UTC (rev 7148)
@@ -0,0 +1,23 @@
+# merge into upstream test_strptime.py at some point
+
+import unittest
+from datetime import datetime
+from test import test_support
+
+
+class ParsingTests(unittest.TestCase):
+
+    def test_iso8601(self):
+        now = datetime.utcnow().replace(microsecond=0)
+        self.assertEqual(now, datetime.strptime(now.isoformat('T'), "%Y-%m-%dT%H:%M:%S"))
+        # tests bug 1662
+        self.assertEqual(now, datetime.strptime(now.isoformat('T') + 'Z', "%Y-%m-%dT%H:%M:%SZ"))
+
+def test_main():
+    test_support.run_unittest(
+        ParsingTests
+    )
+
+
+if __name__ == '__main__':
+    test_main()

Modified: trunk/jython/NEWS
===================================================================
--- trunk/jython/NEWS	2010-10-16 02:55:32 UTC (rev 7147)
+++ trunk/jython/NEWS	2010-10-16 03:04:21 UTC (rev 7148)
@@ -2,6 +2,7 @@
 
 Jython 2.5.2rc1
   Bugs Fixed
+    - [ 1662 ] time.strptime does not use Java date format strings properly
     - [ 1543 ] PyArray fails to clean up pre-allocated space
     - [ 1661 ] Error at on exit in TCC/LE
     - [ 1639 ] JBoss 5, vfszip protocol in use for jarFileName in PySystemState


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev