]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
travis: Resolve issues with Python 3.7
authorStephen Finucane <stephen@that.guru>
Sun, 8 Sep 2019 15:03:17 +0000 (16:03 +0100)
committerStephen Finucane <stephen@that.guru>
Sun, 8 Sep 2019 15:10:15 +0000 (16:10 +0100)
Bump the distro version to xenial, as this is the first version to
include Python 3.7 support. Bionic is also available but it doesn't
support Python 3.5 [1].

In addition, skip a test that was valid on Python 3.4 - 3.6 but does not
appear to be an issue for Python 3.7.

[1] https://docs.travis-ci.com/user/reference/bionic/#python-support

Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: 6267a5fa ("Drop support for Python 3.4, add Python 3.7")
.travis.yml
patchwork/tests/test_parser.py

index 77d60c125a9e08712da0ed2f094c836b8b458426..d3f6d7025b0239585602c7129a71f5e4758681a0 100644 (file)
@@ -1,6 +1,6 @@
 language: python
 
-dist: trusty
+dist: xenial
 sudo: false
 
 python:
index c8f8bd9ff9bb2ec68c4e0294ab2dfc19d270d7fe..e5a2fca3044e54a63f73150ed867a53526277824 100644 (file)
@@ -9,6 +9,7 @@ from email.mime.multipart import MIMEMultipart
 from email.mime.text import MIMEText
 from email.utils import make_msgid
 import os
+import sys
 import unittest
 
 from django.test import TestCase
@@ -981,7 +982,8 @@ class WeirdMailTest(TransactionTestCase):
         except ValueError:
             pass
 
-    @unittest.skipIf(six.PY2, 'Breaks only on Python 3')
+    @unittest.skipUnless((3, 0) <= sys.version_info < (3, 7),
+                         'Breaks only on Python 3.0 - 3.6')
     def test_early_fail(self):
         file_path = os.path.join(TEST_FUZZ_DIR, 'earlyfail.mbox')
         with self.assertRaises(AttributeError):