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_representer.py

    r225 r234  
    3737                                (item2 != item2 or (item2 == 0.0 and item2 == 1.0)): 
    3838                            continue 
     39                        if isinstance(item1, datetime.datetime) \ 
     40                                and isinstance(item2, datetime.datetime): 
     41                            self.failUnlessEqual(item1.microsecond, 
     42                                    item2.microsecond) 
    3943                        if isinstance(item1, datetime.datetime): 
    4044                            item1 = item1.utctimetuple() 
Note: See TracChangeset for help on using the changeset viewer.