fix python test

This commit is contained in:
arvidn 2016-04-07 02:23:21 -04:00
parent b8fec119da
commit a9952a38cf
1 changed files with 5 additions and 0 deletions

View File

@ -46,6 +46,11 @@ class test_torrent_info(unittest.TestCase):
self.assertTrue(len(ti.hash_for_piece(0)) != 0)
def test_iterable_files(self):
# this detects whether libtorrent was built with deprecated APIs
# the file_strage object is only iterable for backwards compatibility
if not hasattr(lt, 'version'): return
ses = lt.session({'alert_mask': lt.alert.category_t.all_categories})
ti = lt.torrent_info('url_seed_multi.torrent');
files = ti.files()