| Conditions | 4 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | # -*- coding: utf-8 -*- |
||
| 20 | def test_jinja2_time_extension(tmpdir): |
||
| 21 | project_dir = cookiecutter( |
||
| 22 | 'tests/test-extensions/default/', |
||
| 23 | no_input=True, |
||
| 24 | output_dir=str(tmpdir) |
||
| 25 | ) |
||
| 26 | changelog_file = os.path.join(project_dir, 'HISTORY.rst') |
||
| 27 | assert os.path.isfile(changelog_file) |
||
| 28 | |||
| 29 | with io.open(changelog_file, 'r', encoding='utf-8') as f: |
||
| 30 | changelog_lines = f.readlines() |
||
| 31 | |||
| 32 | expected_lines = [ |
||
| 33 | 'History\n', |
||
| 34 | '-------\n', |
||
| 35 | '\n', |
||
| 36 | '0.1.0 (2015-12-09)\n', |
||
| 37 | '---------------------\n', |
||
| 38 | '\n', |
||
| 39 | 'First release on PyPI.\n' |
||
| 40 | ] |
||
| 41 | assert expected_lines == changelog_lines |
||
| 42 |