~ubuntu-branches/ubuntu/vivid/python-wadllib/vivid

« back to all changes in this revision

Viewing changes to wadllib/iso_strptime.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-17 11:38:30 UTC
  • Revision ID: james.westby@ubuntu.com-20090317113830-qp3tuvjf2xj96u7a
Tags: 0.1~bzr7-0ubuntu4
* debian/control: Bump python-nose build dependency to >= 0.10.4, which is
  compatible with Python 2.6. (See LP #337585)
* debian/rules: Enable the test suite again.
* wadllib/iso_strptime.py: Fix datetime tuple output comparison to also work
  with Python 2.6. (LP: #344166)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
>>> d = iso_strptime("2008-01-07T05:30:30.345323+03:00")
23
23
>>> d
24
24
datetime.datetime(2008, 1, 7, 5, 30, 30, 345323, tzinfo=TimeZone(10800))
25
 
>>> d.timetuple()
 
25
>>> tuple(d.timetuple())
26
26
(2008, 1, 7, 5, 30, 30, 0, 7, 0)
27
 
>>> d.utctimetuple()
 
27
>>> tuple(d.utctimetuple())
28
28
(2008, 1, 7, 2, 30, 30, 0, 7, 0)
29
29
>>> iso_strptime("2008-01-07T05:30:30.345323-03:00")
30
30
datetime.datetime(2008, 1, 7, 5, 30, 30, 345323, tzinfo=TimeZone(-10800))