-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
Add minimal pytest configuration #31003
Comments
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:3
This file would need comments at the top that explain its purpose |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:5
I've now added documentation, also in the |
comment:6
Does this really need the line |
comment:7
Also, should this not be hooked into tox? |
comment:8
I think it should be said explicitly in the file comments (and the documentation) that this is a no-op and we do not offer ANY tests tested by pytest. (similar to the wording in the ticket description: "Add a minimal pytest configuration, so that calling pytest from src passes without any errors (and without finding any tests for the moment).") |
comment:9
Replying to @mkoeppe:
Yes, for |
comment:10
Replying to @mkoeppe:
That would be the way to go, but I wanted to keep the ticket small (for a change ;-)). |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
Replying to @mkoeppe:
Done! |
comment:13
Replying to @tobiasdiez:
I agree. (Given that it's a no-op, there's no point to hook it into tox now.) |
comment:14
Replying to @tobiasdiez:
Thanks. So it won't be compatible with Python 3.6, but I guess that's OK because we don't really use pytest for anything. |
comment:15
I am getting the following:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:17
You need to run pytest from a virtual environment where Sage has been installed (e.g. using the editable install), since otherwise the imports to cython modules are not resolved. I've clarified this point in the documentation. |
comment:18
Does it work for you now? |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:36
Still needs review. |
comment:37
The issue persists. I think the problem is that, when executing |
comment:38
I read a bit more about it, and in order for pytest to find cython modules you need to use an editable install (that's why it was always working for me, regardless of how I started pytest). For now, I've added deprecation_test.py to the ignored list, so the issue should be fixed. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Reviewer: Matthias Koeppe |
comment:40
OK this looks like a nice clean no-op now. |
comment:41
Thanks! |
comment:42
Documentation doesn't build |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:44
Sorry overlooked this. Since the fix was trivial, I'll put it back to "positive review". |
Changed branch from public/build/pytest_config to |
Add a minimal pytest configuration, so that calling
pytest
fromsrc
passes without any errors (and without finding any tests for the moment).This is a preparation for future usages of pytest, such as #30362 or #30738, and is in the general spirit of #28936 (since pytest is perhaps the testing framework for python). For example, one could imagine using
pytest doctest_modules
to run all sage doctests as well.CC: @mkoeppe
Component: build
Author: Tobias Diez
Branch/Commit:
462f071
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/31003
The text was updated successfully, but these errors were encountered: