-
Notifications
You must be signed in to change notification settings - Fork 687
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i18n_tool: verify user.email & user.name are set before commit
- Loading branch information
Loic Dachary
committed
Mar 21, 2018
1 parent
2b3ca0a
commit 7bd124a
Showing
2 changed files
with
26 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -215,6 +215,21 @@ def test_translate_messages_compile_arg(self, tmpdir): | |
assert 'code hello i18n' in mo | ||
assert 'template hello i18n' not in mo | ||
|
||
def test_require_git_email_name(self, tmpdir): | ||
i18n_tool.sh(""" | ||
cd {dir} | ||
git init | ||
""".format(dir=str(tmpdir))) | ||
with pytest.raises(Exception) as excinfo: | ||
i18n_tool.I18NTool.require_git_email_name(str(tmpdir)) | ||
assert 'please set name' in excinfo.value.message | ||
i18n_tool.sh(""" | ||
cd {dir} | ||
git config user.email "[email protected]" | ||
git config user.name "Your Name" | ||
""".format(dir=str(tmpdir))) | ||
assert i18n_tool.I18NTool.require_git_email_name(str(tmpdir)) | ||
|
||
def test_update_docs(self, tmpdir, caplog): | ||
os.makedirs(join(str(tmpdir), 'includes')) | ||
i18n_tool.sh(""" | ||
|