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
Run tests against Python 3.9 #1270
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1270 +/- ##
=======================================
Coverage 99.44% 99.44%
=======================================
Files 15 15
Lines 1253 1253
=======================================
Hits 1246 1246
Misses 7 7 Continue to review full report at Codecov.
|
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.
Hey @michael-k. Whilst we're here, can we adjust the workflow to not cancel the other jobs in the matrix on the first failure (since "still passes on 3.8" is useful info)?
@michael-k This diff seems to do the job: diff --git a/tests/utils.py b/tests/utils.py
index e11410e..3a4bd25 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -3,13 +3,19 @@ from unittest import mock
from django.db import models
+class QuerySet(models.QuerySet):
+
+ def __bool__(self):
+ return True
+
+
class MockQuerySet:
"""
Generate a mock that is suitably similar to a QuerySet
"""
def __new__(self):
- m = mock.Mock(spec_set=models.QuerySet())
+ m = mock.Mock(spec_set=QuerySet())
m.filter.return_value = m
m.all.return_value = m
return m |
Co-authored-by: Carlton Gibson <carlton@noumenal.es>
\o/ The tests are green now :) |
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.
Super. Let's have it. Thanks!
The tests are currently failing. I couldn't figure out why, but I haven't spent much time looking into it.
If someone else wants to address this, go for it. Otherwise I'll free some time before Python 3.9.0 is released and try to fix this.
Python 3.9.0 final is expected on Monday, 2020-10-05, see https://www.python.org/dev/peps/pep-0596/#schedule