diff --git a/tests/test_isofs.py b/tests/test_isofs.py index 830a52d..66bb0bc 100644 --- a/tests/test_isofs.py +++ b/tests/test_isofs.py @@ -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(): @@ -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 ### diff --git a/tests/test_sevenzipfs.py b/tests/test_sevenzipfs.py index 46bb349..c814fe8 100644 --- a/tests/test_sevenzipfs.py +++ b/tests/test_sevenzipfs.py @@ -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(): @@ -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): diff --git a/tests/test_tarfs.py b/tests/test_tarfs.py index e038e91..8104747 100644 --- a/tests/test_tarfs.py +++ b/tests/test_tarfs.py @@ -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) @@ -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): diff --git a/tests/test_zipfs.py b/tests/test_zipfs.py index 8d5b6f7..9b28e1d 100644 --- a/tests/test_zipfs.py +++ b/tests/test_zipfs.py @@ -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) @@ -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):