diff --git a/pyart/__init__.py b/pyart/__init__.py index 1e5e0f3782..fbd6007e5d 100644 --- a/pyart/__init__.py +++ b/pyart/__init__.py @@ -57,40 +57,3 @@ except DistributionNotFound: # package is not installed __version__ = '0.0.0' - -try: - if _sys.version_info[:2] >= (3, 4): - import importlib as _importlib - specs = _importlib.util.find_spec('pytest') - specs.loader.load_module() - else: - import imp as _imp - _imp.find_module('pytest') -except (AttributeError, ImportError) as error: - def _test(verbose=False): - """ - This would invoke the Py-ART test suite, but pytest couldn't - be imported so the test suite can not run. - """ - raise ImportError("Could not load pytest. Unit tests not available." - " To run unit tests, please install pytest.") -else: - def _test(verbose=False): - """ - Invoke the Py-ART test suite. - """ - import pytest - pkg_dir = _osp.abspath(_osp.dirname(__file__)) - args = [pkg_dir, '--pyargs', 'pyart'] - if verbose: - args.extend(['-v', '-s']) - pytest.main(args=args) - -# Do not use `test` as function name as this leads to a recursion problem -# with the pytest test suite. -#test = _test -#test_verbose = _functools.partial(test, verbose=True) -#test_verbose.__doc__ = test.__doc_ - -#vdict = get_version() -#__version__ = vdict['version']_