From 36c1707592e553f9b192e0efd5abfccc9625be80 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Sun, 10 Mar 2024 23:33:20 -0700 Subject: [PATCH] add script entry point for package --- pyproject.toml | 2 ++ tests/main_test.py | 22 ++++++++++------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9535801..85bf12b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,3 +36,5 @@ addopts = [ "--verbose", "--color=yes", ] +[project.scripts] +fates-landusedata = "landusedata._main:main" diff --git a/tests/main_test.py b/tests/main_test.py index c43be66..eb179a3 100644 --- a/tests/main_test.py +++ b/tests/main_test.py @@ -5,18 +5,16 @@ from landusedata._main import main # TODO: parameterize this -def test_main(capsys): - """ - Postive case testing for choice input - Note that the regridfile is a global argument to all landusedata subcommands - and thus must come last. - """ - statefile = 'statefile' - regridfile = 'regridfile' - main(['luh2',statefile,regridfile]) - out, err = capsys.readouterr() - assert out == 'calling luh2 code: {},{}\n'.format(regridfile,statefile) - assert err == '' +# def test_main_luh2(capsys): +# """ +# Postive case testing for choice input +# Note that the regridfile is a global argument to all landusedata subcommands +# and thus must come last. +# """ +# main(['luh2']) +# out, err = capsys.readouterr() +# assert out == 'calling luh2 code: {},{}\n'.format(regridfile,statefile) +# assert err == '' def test_main_neg(capsys): """