Skip to content
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

Merged
merged 3 commits into from Sep 23, 2020
Merged

Conversation

michael-k
Copy link
Contributor

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

@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2020

Codecov Report

Merging #1270 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 85c9572...467f1ad. Read the comment docs.

Copy link
Owner

@carltongibson carltongibson left a 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)?

@carltongibson
Copy link
Owner

@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

@michael-k
Copy link
Contributor Author

This diff seems to do the job:

\o/

The tests are green now :)

@michael-k michael-k changed the title [WIP] Run tests against Python 3.9 Run tests against Python 3.9 Sep 23, 2020
Copy link
Owner

@carltongibson carltongibson left a 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!

@carltongibson carltongibson merged commit 2ebce74 into carltongibson:master Sep 23, 2020
@michael-k michael-k deleted the python3.9 branch September 23, 2020 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants