|
@@ -21,6 +21,7 @@ class ArchiveTester(object):
|
|
|
self.tmpdir = tempfile.mkdtemp()
|
|
|
self.addCleanup(shutil.rmtree, self.tmpdir)
|
|
|
self.archive_path = os.path.join(TEST_DIR, self.archive)
|
|
|
+ self.archive_lead_path = os.path.join(TEST_DIR, "leadpath_%s" % self.archive)
|
|
|
# Always start off in TEST_DIR.
|
|
|
os.chdir(TEST_DIR)
|
|
|
|
|
@@ -42,6 +43,10 @@ class ArchiveTester(object):
|
|
|
extract(self.archive_path, self.tmpdir)
|
|
|
self.check_files(self.tmpdir)
|
|
|
|
|
|
+ def test_extract_function_with_leadpath(self):
|
|
|
+ extract(self.archive_lead_path, self.tmpdir)
|
|
|
+ self.check_files(self.tmpdir)
|
|
|
+
|
|
|
def test_extract_function_no_to_path(self):
|
|
|
os.chdir(self.tmpdir)
|
|
|
extract(self.archive_path)
|