Skip to content

Commit

Permalink
Fix quickstart command from requiring root positional argument (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbruno25 committed Sep 11, 2023
1 parent 29e0f70 commit 9429881
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/changelog/3084.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix ``quickstart`` command from requiring ``root`` positional argument
1 change: 1 addition & 0 deletions src/tox/session/cmd/quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def tox_add_option(parser: ToxParser) -> None:
"quickstart_root",
metavar="root",
default=Path().absolute(),
nargs="?",
help="folder to create the tox.ini file",
type=Path,
)
Expand Down
5 changes: 5 additions & 0 deletions tests/session/cmd/test_quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,8 @@ def test_quickstart_refuse(tox_project: ToxProjectCreator) -> None:
def test_quickstart_help(tox_project: ToxProjectCreator) -> None:
outcome = tox_project({"tox.ini": ""}).run("q", "-h")
outcome.assert_success()


def test_quickstart_no_args(tox_project: ToxProjectCreator) -> None:
outcome = tox_project({}).run("q")
outcome.assert_success()

0 comments on commit 9429881

Please sign in to comment.