r844 modified test_archivefs.py to not run the TestReadArchiveFS tests if…

r844 modified test_archivefs.py to not run the TestReadArchiveFS tests if libarchve isn't available. This commit "completes" that change by adding the same test-skipping to TestWriteArchiveFS too.
parent 9d5d0fed
...@@ -97,6 +97,8 @@ class TestReadArchiveFS(unittest.TestCase): ...@@ -97,6 +97,8 @@ class TestReadArchiveFS(unittest.TestCase):
class TestWriteArchiveFS(unittest.TestCase): class TestWriteArchiveFS(unittest.TestCase):
__test__ = libarchive_available
def setUp(self): def setUp(self):
self.temp_filename = "".join(random.choice("abcdefghijklmnopqrstuvwxyz") for _ in range(6))+".zip" self.temp_filename = "".join(random.choice("abcdefghijklmnopqrstuvwxyz") for _ in range(6))+".zip"
self.temp_filename = os.path.join(tempfile.gettempdir(), self.temp_filename) self.temp_filename = os.path.join(tempfile.gettempdir(), self.temp_filename)
...@@ -143,6 +145,8 @@ class TestWriteArchiveFS(unittest.TestCase): ...@@ -143,6 +145,8 @@ class TestWriteArchiveFS(unittest.TestCase):
#~ class TestAppendArchiveFS(TestWriteArchiveFS): #~ class TestAppendArchiveFS(TestWriteArchiveFS):
#~ __test__ = libarchive_available
#~ def setUp(self): #~ def setUp(self):
#~ self.temp_filename = "".join(random.choice("abcdefghijklmnopqrstuvwxyz") for _ in range(6))+".zip" #~ self.temp_filename = "".join(random.choice("abcdefghijklmnopqrstuvwxyz") for _ in range(6))+".zip"
#~ self.temp_filename = os.path.join(tempfile.gettempdir(), self.temp_filename) #~ self.temp_filename = os.path.join(tempfile.gettempdir(), self.temp_filename)
...@@ -170,6 +174,8 @@ class TestWriteArchiveFS(unittest.TestCase): ...@@ -170,6 +174,8 @@ class TestWriteArchiveFS(unittest.TestCase):
#~ class TestArchiveFSErrors(unittest.TestCase): #~ class TestArchiveFSErrors(unittest.TestCase):
#~ __test__ = libarchive_available
#~ def setUp(self): #~ def setUp(self):
#~ self.workdir = tempfile.mkdtemp() #~ self.workdir = tempfile.mkdtemp()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment