-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new: reference config file is not anymore required. (fixes #54)
- Loading branch information
Showing
3 changed files
with
67 additions
and
10 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# -*- encoding: utf-8 -*- | ||
"""Reference file is not required to be found | ||
Tests issue #54 | ||
(https://github.com/vaab/gitchangelog/issues/54) | ||
""" | ||
|
||
from __future__ import unicode_literals | ||
|
||
from common import BaseGitReposTest, cmd, file_put_contents | ||
|
||
|
||
class TestConfigComplains(BaseGitReposTest): | ||
|
||
def test_missing_option(self): | ||
super(TestConfigComplains, self).setUp() | ||
|
||
file_put_contents( | ||
".gitchangelog.rc", | ||
"del section_regexps" | ||
) | ||
|
||
out, err, errlvl = cmd('$tprog --debug') | ||
self.assertContains( | ||
err.lower(), "missing value", | ||
msg="There should be an error message containing 'missing value'. " | ||
"Current stderr:\n%s" % err) | ||
self.assertContains( | ||
err.lower(), "config file", | ||
msg="There should be an error message containing 'config file'. " | ||
"Current stderr:\n%s" % err) | ||
self.assertContains( | ||
err.lower(), "section_regexps", | ||
msg="There should be an error message containing 'section_regexps'. " | ||
"Current stderr:\n%s" % err) | ||
self.assertEqual( | ||
errlvl, 1, | ||
msg="Should faild.") | ||
self.assertEqual( | ||
out, "", | ||
msg="No output is expected.") |