File: test-pytz

package info (click to toggle)
python-tz 2010b-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,144 kB
  • ctags: 267
  • sloc: python: 2,192; makefile: 6
file content (17 lines) | stat: -rw-r--r-- 347 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python
"""Run to test the system python"""
import doctest
import pytz
import pytz.tzinfo
import sys

errors = 0
tests = 0
for mod in [pytz, pytz.tzinfo]: 
    mod_errors, mod_tests = doctest.testmod(mod)
    errors += mod_errors
    tests += mod_tests

if not errors:
    print "Ran %s tests successfully." % tests
sys.exit(errors)