Skip to content

Commit 0b5b77a

Browse files
author
Ram Rachum
committed
-
1 parent 43bbf72 commit 0b5b77a

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

misc/testing/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright 2009-2011 Ram Rachum.
2+
# This program is distributed under the LGPL2.1 license.
3+
4+
'''Utilities for testing GarlicSim.'''
5+

misc/testing/zip/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright 2009-2011 Ram Rachum.
2+
# This program is distributed under the LGPL2.1 license.
3+
4+
'''Utilities for testing GarlicSim from zip archives.'''
5+

misc/testing/zip/make_zip.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@
2929

3030
def zip_folder(folder, zip_path, ignored_patterns=[]):
3131
'''
32-
33-
note: creates a folder inside the zip with the same name of the original
32+
Zip `folder` into a zip file specified by `zip_path`.
33+
34+
Note: Creates a folder inside the zip with the same name of the original
3435
folder, in contrast to other implementation which put all of the files on
3536
the root level of the zip.
3637
37-
Doesn't put empty folders in the zip file.
38+
`ignored_patterns` are fnmatch-style patterns specifiying file-paths to
39+
ignore.
3840
39-
tododoc ignored_patterns, they're fnmatch style
41+
Any empty sub-folders will be ignored.
4042
'''
4143
assert os.path.isdir(folder)
4244
source_folder = os.path.realpath(folder)
@@ -69,8 +71,12 @@ def zip_folder(folder, zip_path, ignored_patterns=[]):
6971
zip_file.write(absolute_file_path, destination_file_path)
7072

7173

72-
7374
def make_zip():
75+
'''
76+
Zip all the GarlicSim packages into zip archives in the `build` folder.
77+
78+
This cleans any previous zip archives from the `build` folder.
79+
'''
7480
###########################################################################
7581
# #
7682
module_path = os.path.realpath(os.path.split(__file__)[0])

misc/testing/zip/testing_utilities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This program is distributed under the LGPL2.1 license.
33

44
'''
5-
Defines utilities for testing GarlicSim from zip.
5+
Defines utilities for testing GarlicSim from a zip archive.
66
77
Used by `run_tests.py` in the GarlicSim repo root.
88
'''

0 commit comments

Comments
 (0)