Skip to content

Commit

Permalink
remove load module section (#1234)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrover1 authored Aug 10, 2022
1 parent c9a410f commit 4d8b4d6
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions pyart/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']_

0 comments on commit 4d8b4d6

Please sign in to comment.