diff --git a/oggm/tests/__main__.py b/oggm/tests/__main__.py new file mode 100644 index 000000000..bc2604cc9 --- /dev/null +++ b/oggm/tests/__main__.py @@ -0,0 +1,11 @@ +import os +import sys + +HERE = os.path.dirname(__file__) + +def main(): + import pytest + return pytest.main([HERE] + sys.argv[1:]) + +if __name__ == "__main__": + sys.exit(main()) diff --git a/setup.cfg b/setup.cfg index 9a5a59d5e..742f78d37 100644 --- a/setup.cfg +++ b/setup.cfg @@ -51,3 +51,4 @@ console_scripts = oggm_prepro = oggm.cli.prepro_levels:main oggm_benchmark = oggm.cli.benchmark:main oggm_netrc_credentials = oggm.cli.netrc_credentials:cli + pytest.oggm = oggm.tests.__main__:main