Show More
@@ -108,18 +108,14 b' class TestsBase(object):' | |||
|
108 | 108 | return temp_dir |
|
109 | 109 | |
|
110 | 110 | |
|
111 |
def copy_files_to(self, copy_filenames |
|
|
112 | ||
|
113 | #Copy test files into the destination directory. | |
|
114 | if copy_filenames: | |
|
115 | for pattern in copy_filenames: | |
|
116 | for match in glob.glob(os.path.join(self._get_files_path(), pattern)): | |
|
117 | if destination is None: | |
|
118 |
|
|
|
119 | else: | |
|
120 | if not os.path.isdir(destination): | |
|
121 | os.makedirs(destination) | |
|
122 | shutil.copyfile(match, os.path.join(destination, os.path.basename(match))) | |
|
111 | def copy_files_to(self, copy_filenames, dest='.'): | |
|
112 | "Copy test files into the destination directory" | |
|
113 | if not os.path.isdir(dest): | |
|
114 | os.makedirs(dest) | |
|
115 | files_path = self._get_files_path() | |
|
116 | for pattern in copy_filenames: | |
|
117 | for match in glob.glob(os.path.join(files_path, pattern)): | |
|
118 | shutil.copyfile(match, os.path.join(dest, os.path.basename(match))) | |
|
123 | 119 | |
|
124 | 120 | |
|
125 | 121 | def _get_files_path(self): |
General Comments 0
You need to be logged in to leave comments.
Login now