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
........
diff --git a/Lib/distutils/tests/support.py b/Lib/distutils/tests/support.py
index 48bcbcc..ecc8da1 100644
--- a/Lib/distutils/tests/support.py
+++ b/Lib/distutils/tests/support.py
@@ -42,6 +42,19 @@
         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()."""