/usr/share/pyshared/mx/DateTime/mxDateTime/testabsdatetime.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 19 20 21 22 23 24 25 26 27 28 29 30 31 | import sys
from mx.DateTime import *
# Test for ticket #526
if sys.maxint > 2**32:
print DateTimeFromAbsDateTime(-9580000000)
# Test DateTimeFromAbsDateTime() for a whole range of values
#RANGE = range(-5, 5)
RANGE = range(-1000000, 1000000)
INTERVAL = max(len(RANGE) / 1000, 1)
print 'Gregorian calendar:'
print
for absdate in RANGE:
d = DateTimeFromAbsDateTime(absdate)
assert d.absdate == absdate
if absdate % INTERVAL == 0:
print '%-10s: %s' % (absdate, d)
print
print 'Julian calendar:'
print
for absdate in RANGE:
d = DateTimeFromAbsDateTime(absdate,0,Julian)
assert d.absdate == absdate
if absdate % INTERVAL == 0:
print '%-10s: %s' % (absdate, d)
print
|