-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic tests for prepare-release task
- Loading branch information
Showing
2 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Test prepare-release nox target | ||
|
||
Setup | ||
========================================================= | ||
|
||
$ cat > noxfile.py <<EOF | ||
> """defines nox tasks/targets for this project""" | ||
> import nox | ||
> | ||
> from exasol.toolbox.nox.tasks import prepare_release | ||
> EOF | ||
|
||
|
||
prepare-release without version should fail | ||
========================================================= | ||
|
||
$ nox -s prepare-release | ||
nox > Running session prepare-release | ||
usage: nox -s prepare-release -- [-h] version | ||
nox -s prepare-release: error: the following arguments are required: version | ||
[2] | ||
|
||
|
||
prepare-release with invalid version format should fail | ||
========================================================= | ||
|
||
$ nox -s prepare-release -- 1.B.0 | ||
nox > Running session prepare-release | ||
usage: nox -s prepare-release -- [-h] version | ||
nox -s prepare-release: error: argument version: Expected format: <number>.<number>.<number>, e.g. 1.2.3, actual: 1.B.0 | ||
[2] | ||
|
||
|
||
print prepare-release help | ||
========================================================= | ||
|
||
$ nox -s prepare-release -- -h | ||
nox > Running session prepare-release | ||
usage: nox -s prepare-release -- [-h] version | ||
|
||
positional arguments: | ||
version A version string of the following format:"NUMBER.NUMBER.NUMBER" | ||
|
||
options: | ||
-h, --help show this help message and exit | ||
|
||
|