File: test-pytz

package info (click to toggle)
python-tz 2012c-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,260 kB
  • sloc: python: 2,509; makefile: 26
file content (17 lines) | stat: -rw-r--r-- 344 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/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)