-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use keyword argument quiet to define verbosity of wrapper
The quiet argument is used by copier to define its verbosity. This adds the quiet keyword argument to the wrapper functions to decide whether to print/log. quiet is added to the tests in places that did not have it yet. Closes #379
- Loading branch information
1 parent
4df61f0
commit ac2db7f
Showing
3 changed files
with
30 additions
and
17 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
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 |
---|---|---|
|
@@ -22,7 +22,7 @@ using Test | |
using YAML | ||
|
||
function _git_setup() | ||
run(`git init`) | ||
run(`git init -q`) | ||
run(`git add .`) | ||
run(`git config user.name "Test"`) | ||
run(`git config user.email "[email protected]"`) | ||
|
@@ -199,11 +199,7 @@ end | |
mktempdir(TMPDIR; prefix = "update_") do tmpdir | ||
run(`copier copy --defaults --quiet $cli_args_min_defaults $template_path $tmpdir`) | ||
cd(tmpdir) do | ||
run(`git init`) | ||
run(`git add .`) | ||
run(`git config user.name "Test"`) | ||
run(`git config user.email "[email protected]"`) | ||
run(`git commit -q -m "First commit"`) | ||
_git_setup() | ||
end | ||
BestieTemplate.Copier.update( | ||
tmpdir, | ||
|
@@ -279,6 +275,7 @@ end | |
template_path, | ||
".", | ||
data, | ||
quiet = true, | ||
vcs_ref = "HEAD", | ||
) | ||
end | ||
|
@@ -290,12 +287,12 @@ end | |
mktempdir(TMPDIR) do dir | ||
cd(dir) do | ||
@testset "It fails if the dst_path does not exist" begin | ||
@test_throws Exception BestieTemplate.apply("some_folder1") | ||
@test_throws Exception BestieTemplate.apply("some_folder1", quiet = true) | ||
end | ||
|
||
@testset "It fails if the dst_path exists but does not contains .git" begin | ||
mkdir("some_folder2") | ||
@test_throws Exception BestieTemplate.apply("some_folder2") | ||
@test_throws Exception BestieTemplate.apply("some_folder2", quiet = true) | ||
end | ||
end | ||
end | ||
|