Skip to content

Commit 4abf818

Browse files
committed
fix(stylesheet): assertion stylesheet error for codacy
1 parent eaab02e commit 4abf818

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

test/test_utils.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ def mock_input(s):
1313
return inputs.pop(0)
1414
utils.input = mock_input
1515
a, b = utils.get_text()
16-
assert a == 'tag'
17-
assert b == 'message'
16+
if not a == 'tag':
17+
raise AssertionError()
18+
if not b == 'message':
19+
raise AssertionError()
1820

1921

2022
def test_get_text_context():
@@ -28,14 +30,18 @@ def mock_input(s):
2830
return inputs.pop(0)
2931
utils.input = mock_input
3032
a, b, c = utils.get_text(context=True)
31-
assert a == 'tag'
32-
assert b == 'message'
33-
assert c == 'context'
33+
if not a == 'tag':
34+
raise AssertionError()
35+
if not b == 'message':
36+
raise AssertionError()
37+
if not c == 'context':
38+
raise AssertionError()
3439

3540
# FIXME
3641
# def test_create_file(tmpdir):
3742
# test_file = tmpdir.mkdir('test').join('commiter.yml')
3843
# utils.create_file("changelog")
3944
# stream = open('commiter.yml', 'r')
4045
# convention = yaml.load(stream)
41-
# assert convention['convention'] == 'changelog'
46+
# if not convention['convention'] == 'changelog':
47+
# raise AssertionError()

0 commit comments

Comments
 (0)