-
Notifications
You must be signed in to change notification settings - Fork 42
implemented pytest for makepyfile #286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for other reviewers: See https://github.com/scientific-python/pytest-doctestplus/pull/286/files#r2004356445
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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