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
[RFC] add tox.ini / support for pytest #123
Conversation
@blueyed excellent suggestion. I have always been lazy on this subject. I would like to go ahead on this, could you rewrite the Test section of the README and .travis.yml too? |
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.
welcome changes!!
I've hoped that you would pick it up from here. |
"Now is better than never, although never is probably better than right now" (cit.) |
I am taking this. Feel free to adopt it, of course. |
I don't understand why you closed it. Can it stay open as a reminder for when me or other contributors will have time to look into it? |
1 similar comment
Sure. I understood it wrongly then in the beginning - and came across it when going through my open PRs. Sorry. |
I've updated it: it now allows you to use pytest/pytest-django through tox (used in one matrix entry on Travis). I'll need to revisit myself, but would appreciate any comments/review on it already. |
@blueyed great! Could you squash the commits? One question, why adding pytest to the build? Wouldn't that slow down the build with no practical advantage? |
README.rst
Outdated
@@ -606,6 +610,36 @@ These steps should do the trick: | |||
- run ``python manage.py collectstatic`` | |||
- run ``python manage.py runserver`` | |||
|
|||
|
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.
could you remove this extra blank line?
setup.cfg
Outdated
@@ -1,2 +1,6 @@ | |||
[bdist_wheel] | |||
universal=1 | |||
|
|||
[tool:pytest] |
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.
I'm ignorant of pytest, what's this section for?
Sure, please never merge
Only for demo.. we could use pytest for only one / a few in the end. |
@blueyed can we keep it simple and avoid adding unneeded dependencies to the build please? |
What's the problem with having one build also pip-install pytest/pytest-django? |
I don't want to use more resources than needed and I don't want to slow down the build unnecessarily. We are using a free service after all. Developers can use pytest offline in their own dev environment. |
Do you really think an additional But given that, please comment on the build matrix I came up with otherwise - there are probably things to strip there then?! |
Old (9 builds): https://travis-ci.org/djangonauts/django-rest-framework-gis/builds/229053544 To be clear: my idea was to use |
Also adds Django 1.11 to Travis, closes openwisp#132.
Squashed, and removed pytest from Travis. Also the config for it - still works through Tox. |
@blueyed thanks a lot 👍! |
@nemesisdesign |
This is rudimentary, but makes it a lot easier to run the tests.
Please consider adopting it and mention it in the docs.
It could also be used on Travis.