diff options
author | Chase Sterling <chase.sterling@gmail.com> | 2022-01-26 00:03:12 -0500 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2022-01-26 18:44:47 +0000 |
commit | 23f7c4dd6ed49336d96c47e489ae1c8e83886c88 (patch) | |
tree | 224071745db17b58c94b2ae0a7ff2721c3ea2a20 | |
parent | a41f950d09cf2b4377eccc9b0537b9f6cdc1165f (diff) | |
download | deluge-23f7c4dd6ed49336d96c47e489ae1c8e83886c88.tar.gz deluge-23f7c4dd6ed49336d96c47e489ae1c8e83886c88.tar.bz2 deluge-23f7c4dd6ed49336d96c47e489ae1c8e83886c88.zip |
[Tests] Change example files in files tab test to sort the same on linux/windows
-rw-r--r-- | deluge/tests/test_files_tab.py | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/deluge/tests/test_files_tab.py b/deluge/tests/test_files_tab.py index 54664e093..416c7bc0b 100644 --- a/deluge/tests/test_files_tab.py +++ b/deluge/tests/test_files_tab.py @@ -8,7 +8,6 @@ import pytest from twisted.trial import unittest import deluge.component as component -from deluge.common import windows_check from deluge.configmanager import ConfigManager from deluge.i18n import setup_translation @@ -98,39 +97,35 @@ class FilesTabTestCase(BaseTestCase): self.assertTrue(ret) def test_files_tab2(self): - if windows_check(): - raise unittest.SkipTest('on windows \\ != / for path names') self.filestab.files_list[self.t_id] = ( - {'index': 0, 'path': '1/1/test_10.txt', 'offset': 0, 'size': 13}, - {'index': 1, 'path': 'test_100.txt', 'offset': 13, 'size': 14}, + {'index': 0, 'path': '1/1/test_100.txt', 'offset': 0, 'size': 13}, + {'index': 1, 'path': 'test_101.txt', 'offset': 13, 'size': 14}, ) self.filestab.update_files() self.filestab._on_torrentfilerenamed_event( - self.t_id, self.index, '1/1/test_100.txt' + self.t_id, self.index, '1/1/test_101.txt' ) ret = self.verify_treestore( self.filestab.treestore, - [['1/', [['1/', [['test_100.txt'], ['test_10.txt']]]]]], + [['1/', [['1/', [['test_100.txt'], ['test_101.txt']]]]]], ) if not ret: self.print_treestore('Treestore not expected:', self.filestab.treestore) self.assertTrue(ret) def test_files_tab3(self): - if windows_check(): - raise unittest.SkipTest('on windows \\ != / for path names') self.filestab.files_list[self.t_id] = ( - {'index': 0, 'path': '1/test_10.txt', 'offset': 0, 'size': 13}, - {'index': 1, 'path': 'test_100.txt', 'offset': 13, 'size': 14}, + {'index': 0, 'path': '1/test_100.txt', 'offset': 0, 'size': 13}, + {'index': 1, 'path': 'test_101.txt', 'offset': 13, 'size': 14}, ) self.filestab.update_files() self.filestab._on_torrentfilerenamed_event( - self.t_id, self.index, '1/test_100.txt' + self.t_id, self.index, '1/test_101.txt' ) ret = self.verify_treestore( - self.filestab.treestore, [['1/', [['test_100.txt'], ['test_10.txt']]]] + self.filestab.treestore, [['1/', [['test_100.txt'], ['test_101.txt']]]] ) if not ret: self.print_treestore('Treestore not expected:', self.filestab.treestore) @@ -138,36 +133,34 @@ class FilesTabTestCase(BaseTestCase): def test_files_tab4(self): self.filestab.files_list[self.t_id] = ( - {'index': 0, 'path': '1/test_10.txt', 'offset': 0, 'size': 13}, - {'index': 1, 'path': '1/test_100.txt', 'offset': 13, 'size': 14}, + {'index': 0, 'path': '1/test_100.txt', 'offset': 0, 'size': 13}, + {'index': 1, 'path': '1/test_101.txt', 'offset': 13, 'size': 14}, ) self.filestab.update_files() self.filestab._on_torrentfilerenamed_event( - self.t_id, self.index, '1/2/test_100.txt' + self.t_id, self.index, '1/2/test_101.txt' ) ret = self.verify_treestore( self.filestab.treestore, - [['1/', [['2/', [['test_100.txt']]], ['test_10.txt']]]], + [['1/', [['2/', [['test_101.txt']]], ['test_100.txt']]]], ) if not ret: self.print_treestore('Treestore not expected:', self.filestab.treestore) self.assertTrue(ret) def test_files_tab5(self): - if windows_check(): - raise unittest.SkipTest('on windows \\ != / for path names') self.filestab.files_list[self.t_id] = ( - {'index': 0, 'path': '1/test_10.txt', 'offset': 0, 'size': 13}, - {'index': 1, 'path': '2/test_100.txt', 'offset': 13, 'size': 14}, + {'index': 0, 'path': '1/test_100.txt', 'offset': 0, 'size': 13}, + {'index': 1, 'path': '2/test_101.txt', 'offset': 13, 'size': 14}, ) self.filestab.update_files() self.filestab._on_torrentfilerenamed_event( - self.t_id, self.index, '1/test_100.txt' + self.t_id, self.index, '1/test_101.txt' ) ret = self.verify_treestore( - self.filestab.treestore, [['1/', [['test_100.txt'], ['test_10.txt']]]] + self.filestab.treestore, [['1/', [['test_100.txt'], ['test_101.txt']]]] ) if not ret: self.print_treestore('Treestore not expected:', self.filestab.treestore) |