-
Notifications
You must be signed in to change notification settings - Fork 348
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
Error with Django internal when using pytest >= 4.2 #710
Comments
Please git-bisect it. |
Trying to bisect both When bisecting As I said, the last version of I'm kind of lost here, and I'm not a specialist unfortunalty. |
By the way, ignoring the others fails and errors by
|
Thanks for the info - this is what I suspected.
|
OK, thanks. I'll try the second tomorrow and give you a feedback soon. |
Sorry for the delay. I confirm the tests pass with this constant forced to |
I also just came across this when bumping dependencies for my DRF package. I didn't manage to bisect, only to confirm that the issue was definitely present in 4.2.0, and not in 4.1.1. I was going to look into it further, and started reviewing the changes between said versions, but before going deeper I decided to bump this package to its latest, and it worked fine, so I guess I'd consider the issue solved. The test failure I had only occurred when running the entire suite, not on a subset. I was using the Django I could apply a bisect should you need, but I'd consider this closed? |
@debnet |
Same error with |
@debnet It would be great to have it in a test for pytest-django, e.g. based on pytest's |
Interesting.
How do those fail then? The problem here is that pytest itself added handling of unittest classes, but apparently it behaves a bit different. We really need a way to reproduce this to being able to fix this. The best would be to have a failing test in pytest-django's testsuite, of course. |
(likely only related to when using Just found this: https://code.djangoproject.com/ticket/27391 ("Support unittest.TestCase.debug() method"), which might be related?! Related code in pytest: https://github.com/blueyed/pytest/blob/ace3a02cd485d1024a07d93dc8d58708a882587e/src/_pytest/unittest.py#L220-L227 pytest-django unconditionally sets |
@debnet In the long run I think pytest-django will require pytest >= 4.2, which means that a lot of this code will be removed here, but might just mean that we need to fix this in pytest then instead, or some smaller fix in pytest-django (if it turns out to be a bug after all). |
Likely related issue in pytest: pytest-dev/pytest#5390 |
Still have the issue with the latest release of pytest. |
Error is still present in |
Still present in |
Can't give you a small testcase at the moment but here the complete trace from pytest:
And the same result with Django unittest instead:
|
As you can see, Django doesn't fail any of the tests whereas some test failed in pytest but always at the same spot (inside Django internals). |
|
Are you using that? (#771) |
Hello,
Since I updated pytest to 4.2, I've got errors inside Django internals for some tests.
These tests worked fine with 4.1 and still work fine with Django embedded unittests.
Here the error:
As you can see, the error occurs when updating the last login date inside Django, but it happens only for few tests, which is very odd.
Here my current requirements:
Thanks for any help or insight provided. ;)
The text was updated successfully, but these errors were encountered: