def test(*args): r""" Test `Fipy`. Equivalent to:: $ python setup.py test --modules Use >>> import fipy >>> fipy.test('--help') for a full list of options. Options can be passed in the same way as they are appended at the command line. For example, to test `FiPy` with `Trilinos` and inlining switched on, use >>> fipy.test('--trilinos', '--inline') At the command line this would be:: $ python setup.py test --modules --trilinos --inline """ from setuptools import setup from fipy.tests.testClass import _TestClass from setuptools.command.test import test as _test import tempfile tmpDir = tempfile.mkdtemp() try: setup( name="FiPy", script_args=["egg_info", "--egg-base=" + tmpDir, "test", "--modules"] + list(args), cmdclass={"test": _TestClass(_test)}, ) except SystemExit, exitErr: import shutil shutil.rmtree(tmpDir) raise exitErr
def test(*args): r""" Test `Fipy`. Equivalent to:: $ python setup.py test --modules Use >>> import fipy >>> fipy.test('--help') for a full list of options. Options can be passed in the same way as they are appended at the command line. For example, to test `FiPy` with `Trilinos` and inlining switched on, use >>> fipy.test('--trilinos', '--inline') At the command line this would be:: $ python setup.py test --modules --trilinos --inline """ from setuptools import setup from fipy.tests.testClass import _TestClass from setuptools.command.test import test as _test import tempfile tmpDir = tempfile.mkdtemp() try: setup(name='FiPy', script_args=[ 'egg_info', '--egg-base=' + tmpDir, 'test', '--modules' ] + list(args), cmdclass={'test': _TestClass(_test)}) except SystemExit, exitErr: import shutil shutil.rmtree(tmpDir) raise exitErr
from distutils.core import Command from fipy.tools.performance.efficiency_test import Efficiency_test from fipy.tools.copy_script import Copy_script from fipy.tests.testClass import _TestClass # bootstrap setuptools for users that don't already have it import ez_setup ez_setup.use_setuptools() from setuptools import setup, find_packages # from fipy.tests.testRunner import test, unittest from setuptools.command.test import test as _test test = _TestClass(_test) try: # we only need "unittest" if bitten is installed # (and we're running as a bitten.slave) from bitten.util.testrunner import unittest as _unittest unittest = _TestClass(_unittest) except ImportError as e: unittest = test class build_docs(Command): description = "build the FiPy documentation" # List of option tuples: long name, short name (None if no short
from fipy.tools.performance.efficiency_test import Efficiency_test from fipy.tools.copy_script import Copy_script from fipy.tests.testClass import _TestClass # bootstrap setuptools for users that don't already have it import ez_setup ez_setup.use_setuptools() from setuptools import setup, find_packages # from fipy.tests.testRunner import test, unittest from setuptools.command.test import test as _test test = _TestClass(_test) try: # we only need "unittest" if bitten is installed # (and we're running as a bitten.slave) from bitten.util.testrunner import unittest as _unittest unittest = _TestClass(_unittest) except ImportError, e: unittest = test class build_docs(Command): description = "build the FiPy documentation"