diff --git a/README.md b/README.md index 11467dc..2d17b58 100644 --- a/README.md +++ b/README.md @@ -120,5 +120,5 @@ Supported conventions available: ## Our collaborators | **Name** | **Username** | | :------: | :----------: | -| Arthur José Benedito de Oliveira Assis | @arthur120496 | +| Arthur José Benedito de Oliveira Assis | @arthur0496 | | Matheus Richard T. Gomes | @MatheusRich | diff --git a/test/test_conventions.py b/test/test_conventions.py index e4c5640..c3ad1c3 100644 --- a/test/test_conventions.py +++ b/test/test_conventions.py @@ -1,21 +1,47 @@ -# import pytest -# import conventions.karma_angular as angular -# import conventions.changelog as changelog -# import convention.symphony_cmf as symphony -# import conventions.no_convention as no_convention +import pytest +import conventions.karma_angular as angular +import conventions.changelog as changelog +import conventions.symphony_cmf as symphony +import conventions.no_convention as no_convention -def test_angular_convention(): - pass +def test_angular_convention_with_context(): + message = angular.angular_convention('TAG', 'message', 'context') + + if not ('tag(context): message\n'): + raise AssertionError() + + +def test_angular_convention_without_context(): + message = angular.angular_convention('tag', 'message', '') + + if not ('tag: message\n'): + raise AssertionError() def test_changelog_convention(): - pass + message = changelog.changelog_convention('tag', 'message') + + if not ('TAG: message\n'): + raise AssertionError() def test_symphony_convention(): - pass + message = symphony.symphony_convention('tag', 'message') + + if not ('[Tag] message\n'): + raise AssertionError() def test_no_convention(): - pass + inputs = [ + "message", + ] + + def mock_input(s): + return inputs.pop(0) + no_convention.input = mock_input + + message = no_convention.just_message() + if not message == 'Message\n': + raise AssertionError()