From 12dce2ccdb902efcb963bd2241d93adca5754ba6 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sat, 27 Feb 2016 10:32:13 -0500 Subject: [PATCH] forward port python binding test for torrent_status::save_path --- bindings/python/test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bindings/python/test.py b/bindings/python/test.py index 20988b9b4..324b8cb46 100644 --- a/bindings/python/test.py +++ b/bindings/python/test.py @@ -31,7 +31,8 @@ class test_alerts(unittest.TestCase): ses = lt.session({'alert_mask': lt.alert.category_t.all_categories}) shutil.copy(os.path.join('..', '..', 'test', 'test_torrents', 'base.torrent'), '.') ti = lt.torrent_info('base.torrent'); - h = ses.add_torrent({'ti': ti, 'save_path': '.'}) + h = ses.add_torrent({'ti': ti, 'save_path': os.getcwd()}) + st = h.status() time.sleep(1) ses.remove_torrent(h) ses.wait_for_alert(1000) # milliseconds @@ -39,9 +40,8 @@ class test_alerts(unittest.TestCase): for a in alerts: print(a.message()) - st = h.status() print(st.next_announce) - print(st.name) + self.assertEqual(st.name, 'temp') print(st.errc.message()) print(st.pieces) print(st.last_seen_complete) @@ -51,6 +51,7 @@ class test_alerts(unittest.TestCase): print(st.distributed_copies) print(st.paused) print(st.info_hash) + self.assertEqual(st.save_path, os.getcwd()) class test_bencoder(unittest.TestCase):