-
Notifications
You must be signed in to change notification settings - Fork 58
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
Testing django commands with call_command
causes None to be cached with testmon 1.0.0
#145
Comments
Parametrized django version now, same bug with 2.1 and 2.2 as well. |
The behaviour is not triggered with pytest-testmon 0.9.19 (or lower). |
There was a 1.0.0 alpha and RC and this didn't get reported yet. So 1.0.0 should be stable but this slipped through. Thanks a lot for the thorough report! We'll have a look tomorrow. I also marked the 1.0.0 release here on Github. |
We were creating Module based on code variable value. When file is empty code was empty string and we didnt create Module instance, instead we returned None. This was causing crash in make_nodedata because file exists but module instance was None. Not we create Module instance based on checksum value. Checksum is defined even if file is empty.
@TauPan Problem was fixed, new version is on pypi. You can try it out :) |
Thanks! I've allowed ~= 1.0.0 in my testrepo and with pytest-testmon 1.0.1 all travis builds go green. \o/ |
@TauPan |
Nope. I use travis almost exclusively to reproduce complicated github issues. |
Hi!
I accidentally upgraded to testmon 1.0.0 yesterday, because I had the impression that it was stable. (Maybe because it's the current version on pypi, see https://pypi.org/project/pytest-testmon/ ... but here on github the latest release is 0.9.18.)
I stumbled across this problem where I'm testing django commands with
call_command
(as described in https://docs.djangoproject.com/en/2.2/topics/testing/tools/#topics-testing-management-commands ) and this causesNone
to be stored in the cache.I've made a small github project to reproduce this. Results are in https://travis-ci.org/TauPan/pytest-testmon-bug-none-in-cache
I didn't add different versions of django, as I'm not sure how to do this on travis (maybe I should use tox) and the bug is reproduced.
The text was updated successfully, but these errors were encountered: