/usr/share/pyshared/mx/DateTime/mxDateTime/testcomdates.py is in python-egenix-mxdatetime 3.2.1-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | from mx.DateTime import *
c = 35000.0
error = 0
for i in range(1000000):
t = DateTimeFromCOMDate(c)
tc = t.COMDate()
if not tc == c:
print 'failed for: %s (%.16f != %.16f)' % (t,c,tc)
error = 1
# Let's give IEEE floats a hard time...
if i % 10 == 0:
c = c - 0.009
else:
c = c + 0.0099
if not error:
print 'All went well !'
|