Skip to content

Commit

Permalink
updated version
Browse files Browse the repository at this point in the history
  • Loading branch information
kawagh committed Feb 27, 2021
1 parent ae563ed commit 53c6cf6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ment/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.0'
__version__ = '0.1.1'
8 changes: 5 additions & 3 deletions tests/test_ment.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@


def test_version():
assert __version__ == '0.1.0'
assert __version__ == '0.1.1'


def test_extract_content_for_tag_from_mkd():
mkd_path = Path('tests/sample_mkd/20200219/diary.md')
t1_lines = ['# tag1\n', '- this is tag1 in 20200219\n', '\n', '# tag1\n', '- this is tag1 in 20200219 again\n']
t1_lines = ['# tag1\n', '- this is tag1 in 20200219\n',
'\n', '# tag1\n', '- this is tag1 in 20200219 again\n']
t2_lines = ['# tag2\n', '- this is tag2 in 20200219\n', '\n']
assert t1_lines == extract_content_for_tag_from_mkd(mkd_path, 'tag1')
assert t2_lines == extract_content_for_tag_from_mkd(mkd_path, 'tag2')


def test_synthesize_by_tag():
synthesize_by_tag('tag1', 'tests/sample_mkd/', 'tests/sample_mkd/synthe/')
ret_code = subprocess.run(['diff', '-s', 'tests/sample_mkd/synthe/synthe_tag1.md', 'tests/sample_mkd/target_synthe/synthe_tag1.md']).returncode
ret_code = subprocess.run(['diff', '-s', 'tests/sample_mkd/synthe/synthe_tag1.md',
'tests/sample_mkd/target_synthe/synthe_tag1.md']).returncode
assert ret_code == 0


Expand Down

0 comments on commit 53c6cf6

Please sign in to comment.