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 7779d03
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions oggm/tests/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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 7779d03

Please sign in to comment.