Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix quickstart command from requiring root positional argument #3123

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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()