[Python-checkins] r69551 - python/trunk/Lib/distutils/tests/test_build_ext.py
Tarek Ziadé
ziade.tarek at gmail.com
Thu Feb 12 23:48:14 CET 2009
I have just seen that someone else fixed the leak here when I was
merging my fix in py3k
http://bugs.python.org/issue4373
I came up with another fix, shown below. I think my patch is simpler,
I'd like to :
- change the one in py3k so it is similar
- add Amaury's explanation in setUp
Opinions ?
Tarek
On Thu, Feb 12, 2009 at 9:56 PM, tarek. ziade
<python-checkins at python.org> wrote:
> Author: tarek.ziade
> Date: Thu Feb 12 21:56:21 2009
> New Revision: 69551
>
> Log:
> fixing the leak introduced in r69304
>
> Modified:
> python/trunk/Lib/distutils/tests/test_build_ext.py
>
> Modified: python/trunk/Lib/distutils/tests/test_build_ext.py
> ==============================================================================
> --- python/trunk/Lib/distutils/tests/test_build_ext.py (original)
> +++ python/trunk/Lib/distutils/tests/test_build_ext.py Thu Feb 12 21:56:21 2009
> @@ -1,6 +1,5 @@
> import sys
> import os
> -import tempfile
> import shutil
> from StringIO import StringIO
>
> @@ -19,7 +18,8 @@
> def setUp(self):
> # Create a simple test environment
> # Note that we're making changes to sys.path
> - self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_")
> + self.tmp_dir = os.path.join(os.path.dirname(__file__), 'xx')
> + os.mkdir(self.tmp_dir)
> self.sys_path = sys.path[:]
> sys.path.append(self.tmp_dir)
> shutil.copy(_get_source_filename(), self.tmp_dir)
> _______________________________________________
> Python-checkins mailing list
> Python-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-checkins
>
--
Tarek Ziadé | Association AfPy | www.afpy.org
Blog FR | http://programmation-python.org
Blog EN | http://tarekziade.wordpress.com/
More information about the Python-checkins
mailing list