Skip to content

Commit

Permalink
Add pytest.oggm wrapper
Browse files Browse the repository at this point in the history
This is a workaround for pytest-dev/pytest#1596
Without this, testing an installed version of oggm is impossible.
  • Loading branch information
TimoRoth committed Sep 5, 2022
1 parent 448d817 commit b4b0678
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions oggm/tests/__main__.py
Original file line number Diff line number Diff line change
@@ -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())
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b4b0678

Please sign in to comment.