Ignore:
Timestamp:
10/04/06 03:42:50 (8 years ago)
Author:
xi
Message:

Fix loss of microsecond precision in datetime.datetime constructor (fix #30).
Thanks to edemaine@… for the bug report and the patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/tests/test_constructor.py

    r225 r234  
    289289                                (item2 != item2 or (item2 == 0.0 and item2 == 1.0)): 
    290290                            continue 
     291                        if isinstance(item1, datetime.datetime) \ 
     292                                and isinstance(item2, datetime.datetime): 
     293                            self.failUnlessEqual(item1.microsecond, 
     294                                    item2.microsecond) 
    291295                        if isinstance(item1, datetime.datetime): 
    292296                            item1 = item1.utctimetuple() 
Note: See TracChangeset for help on using the changeset viewer.