Skip to content

Commit

Permalink
Skip unit tests failing because of PyFilesystem/pyfilesystem2#509
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Dec 14, 2021
1 parent 1ba8530 commit e2481f8
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_isofs.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
isofs_utils = None


FS_VERSION = tuple(map(int, fs.__version__.split('.')))


def compress(rr, joliet, il):
def iso_compress(handle, source_fs):
if hasattr(handle, 'seek') and handle.seekable():
Expand Down Expand Up @@ -77,6 +80,13 @@ def destroy_fs(self, fs):
os.remove(self.tempfile)
del self.tempfile

@unittest.skipIf(FS_VERSION < (2, 4, 15), "fails because of PyFilesystem2#509")
def test_move(self):
super(TestISOFS, self).test_move()

@unittest.skipIf(FS_VERSION < (2, 4, 15), "fails because of PyFilesystem2#509")
def test_move_file_same_fs(self):
super(TestISOFS, self).test_move_file_same_fs()

### ro FS ###

Expand Down
10 changes: 10 additions & 0 deletions tests/test_sevenzipfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
SevenZipReadFS = SevenZipFS = SevenZipSaver = None


FS_VERSION = tuple(map(int, fs.__version__.split('.')))


def sevenzip_compress(handle, source_fs):
if hasattr(handle, 'seek') and handle.seekable():
Expand All @@ -50,6 +52,14 @@ def destroy_fs(self, fs):
os.remove(self.tempfile)
del self.tempfile

@unittest.skipIf(FS_VERSION < (2, 4, 15), "fails because of PyFilesystem2#509")
def test_move(self):
super(TestSevenZipFS, self).test_move()

@unittest.skipIf(FS_VERSION < (2, 4, 15), "fails because of PyFilesystem2#509")
def test_move_file_same_fs(self):
super(TestSevenZipFS, self).test_move_file_same_fs()


@unittest.skipUnless(py7zr, 'py7zr not available')
class TestSevenZipReadFS(ArchiveReadTestCases, unittest.TestCase):
Expand Down
11 changes: 11 additions & 0 deletions tests/test_tarfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
from fs.archive._utils import UniversalContainer


FS_VERSION = tuple(map(int, fs.__version__.split('.')))


def tar_compress(handle, source_fs):
if hasattr(handle, 'seek') and handle.seekable():
handle.seek(0)
Expand All @@ -41,6 +44,14 @@ def destroy_fs(self, fs):
os.remove(self.tempfile)
del self.tempfile

@unittest.skipIf(FS_VERSION < (2, 4, 15), "fails because of PyFilesystem2#509")
def test_move(self):
super(TestTarFS, self).test_move()

@unittest.skipIf(FS_VERSION < (2, 4, 15), "fails because of PyFilesystem2#509")
def test_move_file_same_fs(self):
super(TestTarFS, self).test_move_file_same_fs()


class TestTarReadFS(ArchiveReadTestCases, unittest.TestCase):

Expand Down
11 changes: 11 additions & 0 deletions tests/test_zipfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
from fs.archive.test import ArchiveReadTestCases, ArchiveIOTestCases


FS_VERSION = tuple(map(int, fs.__version__.split('.')))


def zip_compress(handle, source_fs):
if hasattr(handle, 'seek') and handle.seekable():
handle.seek(0)
Expand All @@ -39,6 +42,14 @@ def destroy_fs(self, fs):
os.remove(self.tempfile)
del self.tempfile

@unittest.skipIf(FS_VERSION < (2, 4, 15), "fails because of PyFilesystem2#509")
def test_move(self):
super(TestZipFS, self).test_move()

@unittest.skipIf(FS_VERSION < (2, 4, 15), "fails because of PyFilesystem2#509")
def test_move_file_same_fs(self):
super(TestZipFS, self).test_move_file_same_fs()


class TestZipReadFS(ArchiveReadTestCases, unittest.TestCase):

Expand Down

0 comments on commit e2481f8

Please sign in to comment.