From: Stephen Finucane Date: Sun, 8 Sep 2019 15:03:17 +0000 (+0100) Subject: travis: Resolve issues with Python 3.7 X-Git-Tag: v2.2.0-rc1~82 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cdab7910d780bab596e2daaadd01f3162b5ee652;p=thirdparty%2Fpatchwork.git 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 Fixes: 6267a5fa ("Drop support for Python 3.4, add Python 3.7") --- diff --git a/.travis.yml b/.travis.yml index 77d60c12..d3f6d702 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 c8f8bd9f..e5a2fca3 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):