Back to index

python3.2  3.2.2
Public Member Functions
test.test_zipfile.TestWithDirectory Class Reference

List of all members.

Public Member Functions

def setUp
def test_extract_dir
def test_bug_6050
def test_store_dir
def tearDown

Detailed Description

Definition at line 1284 of file test_zipfile.py.


Member Function Documentation

Definition at line 1285 of file test_zipfile.py.

01285 
01286     def setUp(self):
01287         os.mkdir(TESTFN2)

Here is the caller graph for this function:

Definition at line 1306 of file test_zipfile.py.

01306 
01307     def tearDown(self):
01308         shutil.rmtree(TESTFN2)
01309         if os.path.exists(TESTFN):
01310             unlink(TESTFN)
01311 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1295 of file test_zipfile.py.

01295 
01296     def test_bug_6050(self):
01297         # Extraction should succeed if directories already exist
01298         os.mkdir(os.path.join(TESTFN2, "a"))
01299         self.test_extract_dir()

Here is the call graph for this function:

Definition at line 1288 of file test_zipfile.py.

01288 
01289     def test_extract_dir(self):
01290         with zipfile.ZipFile(findfile("zipdir.zip")) as zipf:
01291             zipf.extractall(TESTFN2)
01292         self.assertTrue(os.path.isdir(os.path.join(TESTFN2, "a")))
01293         self.assertTrue(os.path.isdir(os.path.join(TESTFN2, "a", "b")))
01294         self.assertTrue(os.path.exists(os.path.join(TESTFN2, "a", "b", "c")))

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1300 of file test_zipfile.py.

01300 
01301     def test_store_dir(self):
01302         os.mkdir(os.path.join(TESTFN2, "x"))
01303         zipf = zipfile.ZipFile(TESTFN, "w")
01304         zipf.write(os.path.join(TESTFN2, "x"), "x")
01305         self.assertTrue(zipf.filelist[0].filename.endswith("x/"))

Here is the call graph for this function:


The documentation for this class was generated from the following file: