Ejemplo n.º 1
0
def test_slot_ops():
    # Run slot operations tests
    print 'Running slot operation tests.'
    from mx.DateTime.mxDateTime import testslotops
    print

    # Try importing a subpackage
    print 'Importing subpackage Feasts.'
    print
    from mx.DateTime import Feasts
    try:
        Feasts._test()
    except SystemError:
        print '-'*72
        print 'WARNING:'
        print
        print 'Subpackges ISO and ARPA will not work on your platform because'
        print 'mxDateTime found no working API to query the timezone'
        print 'for a given date/time. Please run "python testticks.py" and send'
        print 'the output to the author at [email protected].'
        print
        print '-'*72
    print

    # Run parser tests
    print 'Importing subpackage Parser.'
    print
    from mx.DateTime import Parser
    Parser._test()

    print
    print 'Works.'
Ejemplo n.º 2
0
except KeyboardInterrupt:
    print
    print 'Interrupted.'
else:
    print
print ' Tested ticks range %i to %i.' % (start,t)
assert oops == 0
print '...Works.'
print

# Try importing a subpackage
print 'Importing subpackage Feasts.'
print
from mx.DateTime import Feasts
try:
    Feasts._test()
except SystemError:
    print '-'*72
    print 'WARNING:'
    print
    print 'Subpackges ISO and ARPA will not work on your platform because'
    print 'mxDateTime found no working API to query the timezone'
    print 'for a given date/time. Please run "python testticks.py" and send'
    print 'the output to the author at [email protected].'
    print
    print '-'*72
print

# Run parser tests
print 'Importing subpackage Parser.'
print
Ejemplo n.º 3
0
# Test PyDateTime integration
print 'Running Python datetime module integration tests.'
from mx.DateTime.mxDateTime import testpydatetime
print

# Run slot operations tests
print 'Running slot operation tests.'
from mx.DateTime.mxDateTime import testslotops
print

# Try importing a subpackage
print 'Importing subpackage Feasts.'
print
from mx.DateTime import Feasts
try:
    Feasts._test()
except SystemError:
    print '-' * 72
    print 'WARNING:'
    print
    print 'Subpackges ISO and ARPA will not work on your platform because'
    print 'mxDateTime found no working API to query the timezone'
    print 'for a given date/time. Please run "python testticks.py" and send'
    print 'the output to the author at [email protected].'
    print
    print '-' * 72
print

# Run parser tests
print 'Importing subpackage Parser.'
print