def test_com_date_rounding(): t = DateTime(1998, 2, 24, 12, 40, 11) c = DateTimeFromCOMDate(t.COMDate()) print 'DateTime->COM Date->DateTime rounding error:',(t == c) * 'no' or 'yes' print 'COM Dates compare:',(t.COMDate()==c.COMDate()) * 'equal' or 'not equal' print 'diff =',t-c,'in seconds:',t.second - c.second print 'using cmp(,,0.5):',(cmp(t,c,0.5) == 0) * 'equal' or 'not equal' print