Skip to content

Commit 36c1707

Browse files
committed
add script entry point for package
1 parent a238eea commit 36c1707

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,5 @@ addopts = [
3636
"--verbose",
3737
"--color=yes",
3838
]
39+
[project.scripts]
40+
fates-landusedata = "landusedata._main:main"

tests/main_test.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,16 @@
55
from landusedata._main import main
66

77
# TODO: parameterize this
8-
def test_main(capsys):
9-
"""
10-
Postive case testing for choice input
11-
Note that the regridfile is a global argument to all landusedata subcommands
12-
and thus must come last.
13-
"""
14-
statefile = 'statefile'
15-
regridfile = 'regridfile'
16-
main(['luh2',statefile,regridfile])
17-
out, err = capsys.readouterr()
18-
assert out == 'calling luh2 code: {},{}\n'.format(regridfile,statefile)
19-
assert err == ''
8+
# def test_main_luh2(capsys):
9+
# """
10+
# Postive case testing for choice input
11+
# Note that the regridfile is a global argument to all landusedata subcommands
12+
# and thus must come last.
13+
# """
14+
# main(['luh2'])
15+
# out, err = capsys.readouterr()
16+
# assert out == 'calling luh2 code: {},{}\n'.format(regridfile,statefile)
17+
# assert err == ''
2018

2119
def test_main_neg(capsys):
2220
"""

0 commit comments

Comments
 (0)