Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEL: Remove load module section #1234

Merged
merged 1 commit into from
Aug 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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']_