1#------------------------------------------------------------------------- 2# CxxTest: A lightweight C++ unit testing library. 3# Copyright (c) 2008 Sandia Corporation. 4# This software is distributed under the LGPL License v3 5# For more information, see the COPYING file in the top CxxTest directory. 6# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 7# the U.S. Government retains certain rights in this software. 8#------------------------------------------------------------------------- 9 10# 11# Import and execute the Python test driver for the user guide examples 12# 13 14# Imports 15try: 16 import pyutilib.th as unittest 17 pyutilib_available=True 18except: 19 pyutilib_available=False 20import os 21from os.path import dirname, abspath, abspath, basename 22import sys 23 24if pyutilib_available: 25 currdir = dirname(abspath(__file__))+os.sep 26 datadir = os.sep.join([dirname(dirname(abspath(__file__))),'doc','examples'])+os.sep 27 28 os.chdir(datadir) 29 sys.path.insert(0, datadir) 30 31 from test_examples import * 32 33# Execute the tests 34if __name__ == '__main__': 35 unittest.main() 36