Fixed broken header in new changelogs

dev
Andrew Cassidy 3 years ago
parent 38560702f4
commit d35b7fee83

@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file
## 1.0.1 - 2021-05-10
### Fixed
- Fixed broken header in new changelogs
## 1.0.0 - 2021-05-07
### Changed

@ -28,6 +28,12 @@ class TestCreation(unittest.TestCase):
self.assertTrue(os.path.exists(os.path.abspath(location)), 'yaclog init did not create a file')
self.assertIn(location, result.output, "yaclog init did not echo the file's correct location")
with open(location, 'r') as fp:
self.assertEqual('# Changelog\n', fp.readline())
self.assertEqual('\n', fp.readline())
self.assertEqual('All notable changes to this project will be documented in this file',
fp.readline().rstrip())
with open(location, 'w') as fp:
fp.write(err_str)

@ -223,7 +223,7 @@ class Changelog:
"""
def __init__(self, path=None,
preamble: str = "Changelog\n\nAll notable changes to this project will be documented in this file"):
preamble: str = "# Changelog\n\nAll notable changes to this project will be documented in this file"):
"""
Contents will be automatically read from disk if the file exists

Loading…
Cancel
Save