diff options
| author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-02-16 21:38:01 (GMT) |
|---|---|---|
| committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-02-16 21:38:01 (GMT) |
| commit | 7dd533963fc947982e472db555cd0ee4b937c9cf (patch) | |
| tree | 3d7f441fffb5e63b2d48a5f36bf99e95fdfdf071 /Lib/distutils/tests/support.py | |
| parent | a7b0c12152e6268bb09b462f2a0fe52178ee6065 (diff) | |
| download | cpython-7dd533963fc947982e472db555cd0ee4b937c9cf.zip cpython-7dd533963fc947982e472db555cd0ee4b937c9cf.tar.gz cpython-7dd533963fc947982e472db555cd0ee4b937c9cf.tar.bz2 | |
Fixed #2279: distutils.sdist.add_defaults now add files listed in package_data and data_files
Diffstat (limited to 'Lib/distutils/tests/support.py')
| -rw-r--r-- | Lib/distutils/tests/support.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/distutils/tests/support.py b/Lib/distutils/tests/support.py index 6dfc82c..fbbf35d 100644 --- a/Lib/distutils/tests/support.py +++ b/Lib/distutils/tests/support.py @@ -42,6 +42,19 @@ class TempdirManager(object): self.tempdirs.append(d) return d + def write_file(self, path, content): + """Writes a file in the given path. + + + path can be a string or a sequence. + """ + if isinstance(path, (list, tuple)): + path = os.path.join(*path) + f = open(path, 'w') + try: + f.write(content) + finally: + f.close() class DummyCommand: """Class to store options for retrieval via set_undefined_options().""" |
