-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add project slug name to neuro project init (#1254)
- Loading branch information
Showing
4 changed files
with
60 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
`neuro project init` now supports argument to set default value for generated project directory |
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
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,30 @@ | ||
import pathlib | ||
import shutil | ||
|
||
import pytest | ||
|
||
from tests.e2e import Helper | ||
|
||
|
||
@pytest.mark.e2e | ||
def test_project_init(helper: Helper) -> None: | ||
path = pathlib.Path(f"./name-of-the-project") | ||
assert not path.exists() | ||
try: | ||
helper.run_cli(["project", "init", "-q"]) | ||
assert path.exists() | ||
assert path.is_dir() | ||
finally: | ||
shutil.rmtree(path) | ||
|
||
|
||
@pytest.mark.e2e | ||
def test_project_init_custom_slug(helper: Helper) -> None: | ||
path = pathlib.Path("./my-custom-slug") | ||
assert not path.exists() | ||
try: | ||
helper.run_cli(["project", "init", "-q", "my-custom-slug"]) | ||
assert path.exists() | ||
assert path.is_dir() | ||
finally: | ||
shutil.rmtree(path) |