Skip to content

Added working test_cli.py using valid string inputs#98

Merged
alaniwi merged 4 commits into
clifrom
cli-tests-str-inputs
Mar 5, 2023
Merged

Added working test_cli.py using valid string inputs#98
alaniwi merged 4 commits into
clifrom
cli-tests-str-inputs

Conversation

@agstephens
Copy link
Copy Markdown
Collaborator

@alaniwi: This single test module should be enough to guide you in how to set up the CLI interface. A few notes:

Run with:

pytest -c null tests/test_cli.py 

Note that this uses pytest.mark.parametrize which allows you to define a list of inputs that get parametrised into a single test - so that it runs it once for each input. Note that the inputs demonstrate that we can send strings in for each argument, e.g.:

[CMIP6_ID, "1900-01-16/1901-12-16", "month:jan,apr,aug|year:1901", "0,-10,120,40", "100000,85000"]

@agstephens
Copy link
Copy Markdown
Collaborator Author

@alaniwi: the CI is not passing on Python3.7 at the moment. Please ignore that as we are no longer building daops for py3.7.

@alaniwi alaniwi changed the base branch from master to cli March 5, 2023 13:11
Copy link
Copy Markdown
Collaborator

@alaniwi alaniwi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Have had a look. Merging into "cli" for now.

@alaniwi alaniwi merged commit af68977 into cli Mar 5, 2023
@agstephens agstephens deleted the cli-tests-str-inputs branch April 20, 2023 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants