Commit f72ada6d authored by heroinedor's avatar heroinedor

first running unit tests

parent 06f0ad57
import sys
import unittest
import commit_parser.parser
import semantic_release
from commit_parser.parser import TYPES
class TestParser(unittest.TestCase):
def test_parse_commit_message(self):
self.assertRaises(semantic_release.errors.UnknownCommitMessageStyleError, commit_parser.parser.parse_commit_message, ("my dummy commit message"))
def test_parse_commit_message_other_type(self):
result = commit_parser.parser.parse_commit_message("test: trigger pipeline")
expected = (1, TYPES['other'], '', ("trigger pipeline", '',''))
self.assertEqual(result, expected)
def test_parse_commit_message_major_type(self):
result = commit_parser.parser.parse_commit_message("major: trigger pipeline")
expected = (3, TYPES['major'], '', ("trigger pipeline", '',''))
self.assertEqual(result, expected)
def test_parse_commit_message_minor_type(self):
result = commit_parser.parser.parse_commit_message("minor: trigger pipeline")
expected = (2, TYPES['minor'], '', ("trigger pipeline", '',''))
self.assertEqual(result, expected)
@unittest.skip("demonstrating skipping")
def test_nothing(self):
self.fail("shouldn't happen")
@unittest.skipUnless(sys.platform.startswith("win"), "requires Windows")
def test_windows_support(self):
# windows specific testing code
pass
if __name__ == '__main__':
unittest.main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment