Skip to content

Commit 79fe038

Browse files
committed
Mark BZ2 and XZ tests as slow in tests.test_tarfs
1 parent 5d8009c commit 79fe038

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

tests/mark.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def slow(self):
2+
pass

tests/test_ftpfs.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,9 @@
2727
from fs.test import FSTestCases
2828

2929
try:
30-
from pytest.mark import slow
30+
from pytest import mark
3131
except ImportError:
32-
33-
def slow(cls):
34-
return cls
35-
32+
from . import mark
3633

3734
# Prevent socket timeouts from slowing tests too much
3835
socket.setdefaulttimeout(1)
@@ -135,7 +132,7 @@ def test_manager_with_host(self):
135132
)
136133

137134

138-
@slow
135+
@mark.slow
139136
class TestFTPFS(FSTestCases, unittest.TestCase):
140137

141138
user = "user"
@@ -285,7 +282,7 @@ def test_features(self):
285282
pass
286283

287284

288-
@slow
285+
@mark.slow
289286
class TestAnonFTPFS(FSTestCases, unittest.TestCase):
290287

291288
user = "anonymous"

tests/test_tarfs.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818

1919
from .test_archives import ArchiveTestCases
2020

21+
try:
22+
from pytest import mark
23+
except ImportError:
24+
from . import mark
25+
2126

2227
class TestWriteReadTarFS(unittest.TestCase):
2328
def setUp(self):
@@ -93,6 +98,7 @@ def destroy_fs(self, fs):
9398
del fs._tar_file
9499

95100

101+
@mark.slow
96102
@unittest.skipIf(six.PY2, "Python2 does not support LZMA")
97103
class TestWriteXZippedTarFS(FSTestCases, unittest.TestCase):
98104
def make_fs(self):
@@ -118,6 +124,7 @@ def assert_is_xz(self, fs):
118124
tarfile.open(fs._tar_file, "r:{}".format(other_comps))
119125

120126

127+
@mark.slow
121128
class TestWriteBZippedTarFS(FSTestCases, unittest.TestCase):
122129
def make_fs(self):
123130
fh, _tar_file = tempfile.mkstemp()

0 commit comments

Comments
 (0)