[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
This commit is contained in:
Calum Lind 2019-05-27 15:21:05 +01:00
commit 4212bd6800
2 changed files with 11 additions and 2 deletions

View file

@ -19,8 +19,14 @@ git:
matrix: matrix:
include: include:
- name: Unit tests - Python 3 - name: Unit tests
env: TOX_ENV=py3 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 - if: commit_message =~ SECURITY_TEST
env: TOX_ENV=security env: TOX_ENV=security
- name: Code linting - name: Code linting
@ -35,7 +41,7 @@ matrix:
addons: addons:
apt: apt:
sources: sources:
- sourceline: "ppa:deluge-team/develop" - sourceline: "ppa:libtorrent.org/rc-1.1-daily"
- deadsnakes - deadsnakes
packages: packages:
- python3-libtorrent - python3-libtorrent

View file

@ -216,6 +216,9 @@ class TorrentTestCase(BaseTestCase):
def test_torrent_error_resume_data_unaltered(self): def test_torrent_error_resume_data_unaltered(self):
if windows_check(): if windows_check():
raise unittest.SkipTest('unexpected end of file in bencoded string') 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 = { resume_data = {
'active_time': 13399, 'active_time': 13399,
'num_incomplete': 16777215, 'num_incomplete': 16777215,