File tree Expand file tree Collapse file tree 3 files changed +41
-6
lines changed
Expand file tree Collapse file tree 3 files changed +41
-6
lines changed Original file line number Diff line number Diff line change 1-
1+ [ ![ Build Status ] ( https://travis-ci.org/andre-filho/commit-helper.svg?branch=master )] ( https://travis-ci.org/andre-filho/commit-helper )
22[ ![ Maintainability] ( https://api.codeclimate.com/v1/badges/0ef7545d395120222d77/maintainability )] ( https://codeclimate.com/github/andre-filho/commit-helper/maintainability )
33[ ![ Codacy Badge] ( https://api.codacy.com/project/badge/Grade/595af9a088cf44e19ec2679a8c2617f6 )] ( https://www.codacy.com/app/andre-filho/commit-helper?utm_source=github.com& ; utm_medium=referral& ; utm_content=andre-filho/commit-helper& ; utm_campaign=Badge_Grade )
44
Original file line number Diff line number Diff line change 11import pytest
2-
2+ # import conventions.karma_angular as angular
3+ # import conventions.changelog as changelog
4+ # import convention.symphony_cmf as symphony
5+ # import conventions.no_convention as no_convention
36
47def test_angular_convention ():
58 pass
Original file line number Diff line number Diff line change 11import pytest
2+ import utils
3+ import yaml
24
35
4- def test_get_text ():
5- pass
6+ def test_get_text_no_context ():
7+ inputs = [
8+ "tag" ,
9+ "message" ,
10+ ]
611
12+ def mock_input (s ):
13+ return inputs .pop (0 )
14+ utils .input = mock_input
15+ a , b = utils .get_text ()
16+ assert a == 'tag'
17+ assert b == 'message'
718
8- def test_create_file ():
9- pass
19+
20+ def test_get_text_context ():
21+ inputs = [
22+ "tag" ,
23+ "message" ,
24+ "context" ,
25+ ]
26+
27+ def mock_input (s ):
28+ return inputs .pop (0 )
29+ utils .input = mock_input
30+ a , b , c = utils .get_text (context = True )
31+ assert a == 'tag'
32+ assert b == 'message'
33+ assert c == 'context'
34+
35+ # FIXME
36+ # def test_create_file(tmpdir):
37+ # test_file = tmpdir.mkdir('test').join('commiter.yml')
38+ # utils.create_file("changelog")
39+ # stream = open('commiter.yml', 'r')
40+ # convention = yaml.load(stream)
41+ # assert convention['convention'] == 'changelog'
You can’t perform that action at this time.
0 commit comments