summaryrefslogtreecommitdiffstats
path: root/deluge/tests/test_common.py
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2021-07-24 14:11:58 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2021-08-01 08:48:27 +0100
commitb89b2c45b145c33c41115a9aac6e46b085ce668a (patch)
tree8c373cdb925284b6915061659efb2444bfa0b89c /deluge/tests/test_common.py
parente38f1173cf470f2f8373f2fa4edbb726c932c980 (diff)
downloaddeluge-b89b2c45b145c33c41115a9aac6e46b085ce668a.tar.gz
deluge-b89b2c45b145c33c41115a9aac6e46b085ce668a.tar.bz2
deluge-b89b2c45b145c33c41115a9aac6e46b085ce668a.zip
[Console] Fix using windows-curses on Windows
The console tests are still failing on Windows due to an issue where the sys args are not being correctly replaced in the tests so the pytest args are being passed to console.
Diffstat (limited to 'deluge/tests/test_common.py')
-rw-r--r--deluge/tests/test_common.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/deluge/tests/test_common.py b/deluge/tests/test_common.py
index 3cecb6467..4f6aa2fd4 100644
--- a/deluge/tests/test_common.py
+++ b/deluge/tests/test_common.py
@@ -8,6 +8,7 @@
from __future__ import unicode_literals
import os
+import sys
import tarfile
from twisted.trial import unittest
@@ -98,8 +99,9 @@ class CommonTestCase(unittest.TestCase):
self.assertTrue(is_infohash('2dc5d0e71a66fe69649a640d39cb00a259704973'))
def test_get_path_size(self):
- if windows_check():
- raise unittest.SkipTest('os devnull is different on windows')
+ if windows_check() and sys.version_info < (3, 8):
+ # https://bugs.python.org/issue1311
+ raise unittest.SkipTest('os.devnull returns False on Windows')
self.assertTrue(get_path_size(os.devnull) == 0)
self.assertTrue(get_path_size('non-existant.file') == -1)