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
switched from nose to pytest #266
Conversation
Nice! Thanks for doing this. For some reason master is failing CI now, that means something changed externally. Would feel better if CI was green before merging this. |
I'm not able to reproduce the failures locally. I have |
Yes, possibly. That's what needs to be figured out :) |
Sometimes the tests freeze on Python3.6 when running tox locally. I will try to work on the issues on the weekend. |
@meiralins have you had the chance to look at the issue past weekend? If not, is there anything I can do to get this moving? |
@meitham sorry, I didn't. |
The two travis builds I looked at, show this error many times:
Next step would be to compare the versions of whatever other packages are involved, with your local environment. Or start a ubuntu trusty 14.04 VM, and try the tests there. Most precise would be to do the same steps that we tell the CI to do. There's no point in merging this if the tests are failing. I don't have time to investigate this myself. |
dcf80da
to
a5807ba
Compare
Just noticed this part. I wonder if that was related to the failures on CI? Anyway it seems to pass now, great! |
] | ||
|
||
extras_require = { | ||
'pyuv': ['pyuv>=1.0.0'], |
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.
what's this for?
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 thought this is convention in setuptools to define what your tests requirement is, so that the below works.
python setup.py test
I think the previous CI failure are related how pytest captures the stdout/stderr which interferes with msgpack, adding the -s flag alone (no capture) did not help, but there were few bugs fixed in latest pytest around capturing so a combination of no capture and pytest upgrade did the trick. |
lint build is failing:
Looks like that is also failing on master ... |
I have a fix for that in #325 |
Anyone else want to stare at this for a sanity check? Else I will merge. |
This release adds support for Python 3.7 which now is in beta. `async` is a keyword in python3.7, and it should be replaced with `async_` when used as a keyword argument to API methods. `async` is still supported with python 2.7 and 3.6 for the moment, but considered deprecated. Also, integration with the in-process lua interpreter in Nvim is now supported. Changes since 0.2.4: * debcde0 clean up remote object implementation (#313) * e880fe7 Guidelines for local plugin development (#317) * 1ab98e8 Update the working directory on DirChanged for legacy plugins (#296) * d53415d Fix SyntaxError in py3.7: use `async_` instead of `async` (#274) * b65f62d Use `pytest` as `nosetests` are not longer maintained (#266) * d9aed96 Support using lua functions. `buf.update_higlights` as an internal example (#325)
This is a rather large commit, and apologies in advance that I didn't discuss the change before making the pull request.
This current test suite uses
nosetest
which is a project that is no longer being maintained. Nose website is recommending two alternatives to nose, nose2 and pytest. I picked pytest as it is the more popular choice in the community, and for the test fixtures it provided.I have left the setup function (that runs before every test), but I have commented the lines where we call it. It is no longer needed with pytest, as each test received a new instance of neovim.
The tests are slighly slower on pytest compared to nose, (0.5 seconds difference), but this can be improved if we add the pytest-xdist plugin, where the tests can run in parallel.