File: test.py

package info (click to toggle)
preprocess 1.1.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 472 kB
  • ctags: 218
  • sloc: python: 1,640; cpp: 260; makefile: 31; fortran: 24
file content (32 lines) | stat: -rw-r--r-- 817 bytes parent folder | download
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
32
#!/usr/bin/env python
# Copyright (c) 2005-2006 ActiveState Software Inc.

"""The preprocess test suite entry point."""

import os
from os.path import exists, join, dirname, abspath
import sys
import logging
from pprint import pprint

import testlib


log = logging.getLogger("test")
default_tags = ["-knownfailure"]


def setup():
    # Ensure the *development* preprocess.py is tested.
    lib_dir = join(dirname(dirname(abspath(__file__))), "lib")
    sys.path.insert(0, lib_dir)
    sys.stdout.write("Setup to test: ")
    sys.stdout.flush()
    preprocess_py = join(lib_dir, "preprocess.py")
    os.system("%s %s -V" % (sys.executable, preprocess_py))
    sys.stdout.write("-"*70 + '\n')

if __name__ == "__main__":
    retval = testlib.harness(setup_func=setup, default_tags=default_tags)
    sys.exit(retval)