diff --git a/docs-static/usage.md b/docs-static/usage.md index b035758..472d0d0 100644 --- a/docs-static/usage.md +++ b/docs-static/usage.md @@ -56,12 +56,16 @@ print(changelog) ### Output(Raw) #### Features :sparkles:: - > feat: add a nice feature to the project + > add a nice feature to the project #### Security :shield:: - > security: fix a security leak on the Foo2 component + > fix a security leak on the Foo2 component + #### Style :art:: + > reindent the full Foo class ### Output (rendered) #### Features :sparkles:: -> feat: add a nice feature to the project +> add a nice feature to the project #### Security :shield:: -> security: fix a security leak on the Foo2 component +> fix a security leak on the Foo2 component +#### Style :art:: +> reindent the full Foo class \ No newline at end of file diff --git a/test/test_changelogfactory.py b/test/test_changelogfactory.py index 0605376..fcab973 100644 --- a/test/test_changelogfactory.py +++ b/test/test_changelogfactory.py @@ -43,7 +43,6 @@ class Testtest_module(unittest.TestCase): raw = "break: testbreak" + "\n" + "docs: testdoc" + "\n" + "style: teststyle" + "\n" + "test: testtest" pychangelogfactory.ChangeLogFormater.FactoryProcessFullChangelog(raw) changelog = pychangelogfactory.ChangeLogFormater.RenderFullChangelog().splitlines() - print(changelog) self.assertIn("testbreak", changelog[1]) self.assertIn("teststyle", changelog[3]) self.assertIn("testdoc", changelog[5]) @@ -120,23 +119,21 @@ class Testtest_module(unittest.TestCase): self.simplegeneration("revert: teststring", ["~~teststring~~"]) def test_sample(self): - raw_changelog = """ - feat: add a nice feature to the project - style: reindent the full Foo class - security: fix a security leak on the Foo2 component - """ + raw_changelog = ( + "feat: add a nice feature to the project\n" + "style: reindent the full Foo class\n" + "security: fix a security leak on the Foo2 component" + ) pychangelogfactory.ChangeLogFormater.FactoryProcessFullChangelog(raw_changelog) changelog = pychangelogfactory.ChangeLogFormater.RenderFullChangelog() expected_formated = ( - "#### Features :sparkles::" - + "\n" - + "> feat: add a nice feature to the project" - + "\n" - + "#### Security :shield::" - + "\n" - + "> security: fix a security leak on the Foo2 component" - + "\n" + "#### Features :sparkles::\n" + "> add a nice feature to the project\n" + "#### Security :shield::\n" + "> fix a security leak on the Foo2 component\n" + "#### Style :art::\n" + "> reindent the full Foo class\n" ) self.assertEqual(changelog, expected_formated)