aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2019-09-08 16:03:17 +0100
committerStephen Finucane <stephen@that.guru>2019-09-08 16:10:15 +0100
commitcdab7910d780bab596e2daaadd01f3162b5ee652 (patch)
treee9316d99106ffa825e67ac77655df997879b258c
parent4720356f3ef40a23d848a541551841cbde6df506 (diff)
downloadpatchwork-cdab7910d780bab596e2daaadd01f3162b5ee652.tar
patchwork-cdab7910d780bab596e2daaadd01f3162b5ee652.tar.gz
travis: Resolve issues with Python 3.7
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")
-rw-r--r--.travis.yml2
-rw-r--r--patchwork/tests/test_parser.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index 77d60c1..d3f6d70 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,6 @@
language: python
-dist: trusty
+dist: xenial
sudo: false
python:
diff --git a/patchwork/tests/test_parser.py b/patchwork/tests/test_parser.py
index c8f8bd9..e5a2fca 100644
--- a/patchwork/tests/test_parser.py
+++ b/patchwork/tests/test_parser.py
@@ -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):