tests: improve cli tests

This commit is contained in:
Sina Atalay 2024-06-20 13:55:15 +03:00
parent 85a9e79fd4
commit 5790abca65
1 changed files with 3 additions and 1 deletions

View File

@ -460,10 +460,12 @@ def test_new_command_with_invalid_theme(tmp_path):
def test_new_command_with_dont_create_files(tmp_path, option, folder_name): def test_new_command_with_dont_create_files(tmp_path, option, folder_name):
# change the current working directory to the temporary directory: # change the current working directory to the temporary directory:
os.chdir(tmp_path) os.chdir(tmp_path)
runner.invoke(cli.app, ["new", "Jahn Doe", option]) result = runner.invoke(cli.app, ["new", "Jahn Doe", option])
source_files_path = tmp_path / folder_name source_files_path = tmp_path / folder_name
assert folder_name not in result.stdout
assert not source_files_path.exists() assert not source_files_path.exists()