Conditions | 2 |
Total Lines | 22 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | """ |
||
21 | @pytest.mark.parametrize("template", ["include", "no-templates", "extends", "super"]) |
||
22 | def test_build_templates(template, output_dir): |
||
23 | """ |
||
24 | Verify Templates Design keywords. |
||
25 | |||
26 | no-templates is a compatibility tests for repo without `templates` directory |
||
27 | """ |
||
28 | project_dir = main.cookiecutter( |
||
29 | f'tests/test-templates/{template}', |
||
30 | no_input=True, |
||
31 | output_dir=output_dir, |
||
32 | ) |
||
33 | |||
34 | readme_file = os.path.join(project_dir, 'requirements.txt') |
||
35 | |||
36 | with codecs.open(readme_file, encoding='utf8') as f: |
||
37 | readme = f.read().splitlines() |
||
38 | |||
39 | assert readme == [ |
||
40 | "pip==19.2.3", |
||
41 | "Click==7.0", |
||
42 | "pytest==4.6.5", |
||
43 | ] |
||
44 |