implemented pytest for makepyfile#286
implemented pytest for makepyfile#286d-chris wants to merge 9 commits intoscientific-python:mainfrom
Conversation
see: fixture `testdir.makepyfile` does not encode files properly scientific-python#285
Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
|
|
||
| text = Path(file).read_text(enc) | ||
|
|
||
| print(text, diff) |
There was a problem hiding this comment.
Note for other reviewers: See https://github.com/scientific-python/pytest-doctestplus/pull/286/files#r2004356445
There was a problem hiding this comment.
set env variable PYTEST_DEBUG_MAKEPYFILE to run test function
|
Thanks for adding the tests! Some comments posted and hopefully more eyes can look at this. |
|
@bsipocz you don' t have to run the CI, test are still failing somehow I don't know if further debugging makes any sense. I guess
|
|
Ahh, OK. I suppose I was pushing the buttons faster than I was reading the comments ;) |
|
problem is located in pytest, guess have to open an issue there. nothing we can do, except dont use fixture pytetsrequired fix is unpack args and kwargs: usage
make_file = testdir.makepyfile(
bytes_content,
files={},
encoding=encoding,
) |
|
Upstream basically said not to do this, so I'm closing the PR as Christoph suggested. Thanks for all the work you put in the investigation! |
see: fixture
testdir.makepyfiledoes not encode files properly #285hopefully the tests will show there is something odd, and someone can fix it
run pytests:
pytest tests\test_makepyfile.py::test_compare_make_basic_file