Module: deluge
Branch: master
Commit: 16b832f7ab5c313f2d28a26816e584137523272b

Author: Andrew Resch <[email protected]>
Date:   Sat Mar 20 19:12:10 2010 -0700

Fix importing libtorrent

---

 tests/test_maketorrent.py |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/tests/test_maketorrent.py b/tests/test_maketorrent.py
index 4276262..a9a0d17 100644
--- a/tests/test_maketorrent.py
+++ b/tests/test_maketorrent.py
@@ -9,13 +9,13 @@ from deluge import maketorrent
 
 def check_torrent(filename):
     # Test loading with libtorrent to make sure it's valid
-    import libtorrent as lt
+    from deluge._libtorrent import lt
     lt.torrent_info(filename)
-    
+
     # Test loading with our internal TorrentInfo class
     from deluge.ui.common import TorrentInfo
-    ti = TorrentInfo(filename)    
-    
+    ti = TorrentInfo(filename)
+
 class MakeTorrentTestCase(unittest.TestCase):
     def test_save_multifile(self):
         # Create a temporary folder for torrent creation
@@ -23,14 +23,14 @@ class MakeTorrentTestCase(unittest.TestCase):
         open(os.path.join(tmp_path, "file_A"), "wb").write("a" * (312 * 1024))
         open(os.path.join(tmp_path, "file_B"), "wb").write("b" * (2354 * 1024))
         open(os.path.join(tmp_path, "file_C"), "wb").write("c" * (11 * 1024))
-        
+
         t = maketorrent.TorrentMetadata()
         t.data_path = tmp_path
         tmp_file = tempfile.mkstemp(".torrent")[1]
         t.save(tmp_file)
-        
+
         check_torrent(tmp_file)
-        
+
         os.remove(os.path.join(tmp_path, "file_A"))
         os.remove(os.path.join(tmp_path, "file_B"))
         os.remove(os.path.join(tmp_path, "file_C"))
@@ -44,7 +44,7 @@ class MakeTorrentTestCase(unittest.TestCase):
         t.data_path = tmp_data
         tmp_file = tempfile.mkstemp(".torrent")[1]
         t.save(tmp_file)
-        
+
         check_torrent(tmp_file)
 
         os.remove(tmp_data)
@@ -56,17 +56,17 @@ class MakeTorrentTestCase(unittest.TestCase):
         open(os.path.join(tmp_path, "file_A"), "wb").write("a" * (312 * 1024))
         open(os.path.join(tmp_path, "file_B"), "wb").write("b" * (2354 * 1024))
         open(os.path.join(tmp_path, "file_C"), "wb").write("c" * (11 * 1024))
-        
+
         t = maketorrent.TorrentMetadata()
         t.data_path = tmp_path
         t.pad_files = True
         tmp_file = tempfile.mkstemp(".torrent")[1]
         t.save(tmp_file)
-        
+
         check_torrent(tmp_file)
-        
+
         os.remove(os.path.join(tmp_path, "file_A"))
         os.remove(os.path.join(tmp_path, "file_B"))
         os.remove(os.path.join(tmp_path, "file_C"))
         os.rmdir(tmp_path)
-        os.remove(tmp_file)        
+        os.remove(tmp_file)

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to