File: test.py

package info (click to toggle)
python-clientform 0.2.10-2.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 560 kB
  • ctags: 522
  • sloc: python: 4,848; makefile: 60
file content (25 lines) | stat: -rw-r--r-- 576 bytes parent folder | download | duplicates (3)
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
import os
import sys


def main():
    try:
        __file__
    except NameError:
        this_file = os.path.abspath(sys.argv[0])
    else:
        this_file = os.path.abspath(__file__)
    test_dir = os.path.join(os.path.dirname(this_file), "test")
    sys.path.insert(0, test_dir)
    try:
        import warnings
    except ImportError:
        pass
    else:
        warnings.filterwarnings(
            action="ignore", message="import \* only allowed at module level")
    execfile(os.path.join(test_dir, "test_clientform.py"))


if __name__ == "__main__":
    main()