Closed GenevieveBuckley closed 10 months ago
I'm not entirely sure how to handle all the assert result.project_dir.name ==
statements scattered through usage.rst
.
Since this isn't what actually happens when you run pytest-copie, we should change them. result.project_dir
is generally the temp pytest folder, named something like copie0001
, copie0002
, etc. which doesn't give us a meaningful name attribute.
I count 4 places where this is written in the docs:
For (2) and (3) I can do this, because we have prior knowledge about what the contents of the README.rst.jinja
file is supposed to be:
assert result.project_dir.is_dir()
with open(result.project_dir/"README.rst") as f:
assert f.readline() == "foobar\n" # or "helloworld\n"
For (1), we don't have any prior knowledge of the template contents, so we can't do this. It might be best to just remove that line. That might not be a great solution, but it is better than keeping the inaccurate info.
For (4), I'm not sure. I haven't used custom templates yet. I'll have to try it out and see what happens.
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
c9f5e3f
) 98.59% compared to head (532f736
) 96.00%. Report is 4 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Nice catch - I totally assumed I was appending to that file instead of overwriting it, thank you! I think it should be fixed now.
Closes https://github.com/12rambau/pytest-copie/issues/48