From 0d0506ecef273135cf5c13ad5be2ad6448a155eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 16 Feb 2009 21:49:12 +0000 Subject: Merged revisions 69692 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69692 | tarek.ziade | 2009-02-16 22:38:01 +0100 (Mon, 16 Feb 2009) | 1 line Fixed #2279: distutils.sdist.add_defaults now add files listed in package_data and data_files ........ --- Lib/distutils/tests/support.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Lib/distutils/tests/support.py') diff --git a/Lib/distutils/tests/support.py b/Lib/distutils/tests/support.py index 48bcbccfc5..ecc8da174e 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().""" -- cgit v1.2.1