File: runtests.py

package info (click to toggle)
simpleparse 2.1.0a1-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 2,776 kB
  • ctags: 4,332
  • sloc: python: 7,036; ansic: 6,395; makefile: 22
file content (15 lines) | stat: -rw-r--r-- 365 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import sys
from os.path import join
from distutils.sysconfig import get_python_lib
from site import addsitedir

root = sys.argv.pop(1)
site_packages = get_python_lib().replace('dist-packages', 'site-packages')

_path = sys.path[:]
sys.path[:] = []
addsitedir(join(root, site_packages[1:]))
sys.path.extend(_path)
sys.path.append("tests")

execfile("tests/test.py")