From 4212bd68001af30a6c7b2bde7ad923d6c6f69b59 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Mon, 27 May 2019 15:21:05 +0100 Subject: [PATCH] [Travis] Add unit test for libtorrent 1.2 Skip test_torrent_error_resume_original_state on libtorrent 1.2 as it is failing for an unknown reason. Refs: #3255 --- .travis.yml | 10 ++++++++-- deluge/tests/test_torrent.py | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5dc043a62..db6824561 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,8 +19,14 @@ git: matrix: include: - - name: Unit tests - Python 3 + - name: Unit tests env: TOX_ENV=py3 + - name: Unit tests (libtorrent 1.2) + env: TOX_ENV=py3 + addons: + apt: + sources: [sourceline: "ppa:libtorrent.org/1.2-daily"] + packages: [python3-libtorrent, python3-venv] - if: commit_message =~ SECURITY_TEST env: TOX_ENV=security - name: Code linting @@ -35,7 +41,7 @@ matrix: addons: apt: sources: - - sourceline: "ppa:deluge-team/develop" + - sourceline: "ppa:libtorrent.org/rc-1.1-daily" - deadsnakes packages: - python3-libtorrent diff --git a/deluge/tests/test_torrent.py b/deluge/tests/test_torrent.py index 7bbe79ed8..70fec4771 100644 --- a/deluge/tests/test_torrent.py +++ b/deluge/tests/test_torrent.py @@ -216,6 +216,9 @@ class TorrentTestCase(BaseTestCase): def test_torrent_error_resume_data_unaltered(self): if windows_check(): raise unittest.SkipTest('unexpected end of file in bencoded string') + if lt.__version__.split('.')[1] == '2': + raise unittest.SkipTest('Test not working as expected on lt 1.2') + resume_data = { 'active_time': 13399, 'num_incomplete': 16777215,