Definition at line 21 of file zip_utils_test.py.
◆ test_nonexistent_dir()
def zip_utils_test.ZipUtilsTest.test_nonexistent_dir |
( |
|
self | ) |
|
Definition at line 67 of file zip_utils_test.py.
67 def test_nonexistent_dir(self):
69 with self.assertRaises(IOError):
71
72
def zip(target_dir, zip_file, to_skip=None)
◆ test_to_skip()
def zip_utils_test.ZipUtilsTest.test_to_skip |
( |
|
self | ) |
|
Definition at line 42 of file zip_utils_test.py.
42 def test_to_skip(self):
44
46 fw.mkdir('.git')
47 fw.write(os.path.join('.git', 'index'))
48 fw.write('somefile')
49 fw.write('.DS_STORE')
50 fw.write('leftover.pyc')
51 fw.write('.pycfile')
52
53
54 zip_utils.zip(
'input',
'test.zip', to_skip=[
'.git',
'.DS*',
'*.pyc'])
56
57
58
59 fw.remove(os.path.join('.git', 'index'))
60 fw.remove('.git')
61 fw.remove('.DS_STORE')
62 fw.remove('leftover.pyc')
63
64
66
def compare_trees(test, a, b)
def unzip(zip_file, target_dir)
◆ test_zip_unzip()
def zip_utils_test.ZipUtilsTest.test_zip_unzip |
( |
|
self | ) |
|
Definition at line 22 of file zip_utils_test.py.
22 def test_zip_unzip(self):
25
26 fw.mkdir('mydir')
27 fw.mkdir('anotherdir', 0o666)
28 fw.mkdir('dir3', 0o600)
29 fw.mkdir('subdir')
30 fw.write('a.txt', 0o777)
31 fw.write('b.txt', 0o751)
32 fw.write('c.txt', 0o640)
33 fw.write(os.path.join('subdir', 'd.txt'), 0o640)
34
35
38
39
41
The documentation for this class was generated from the following file: