import unittest
from test import support
+# http://bugs.python.org/issue4373
+# Don't load the xx module more than once.
+ALREADY_TESTED = False
+
class BuildExtTestCase(unittest.TestCase):
def setUp(self):
# Create a simple test environment
shutil.copy(xx_c, self.tmp_dir)
def test_build_ext(self):
+ global ALREADY_TESTED
xx_c = os.path.join(self.tmp_dir, 'xxmodule.c')
xx_ext = Extension('xx', [xx_c])
dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]})
finally:
sys.stdout = old_stdout
+ if ALREADY_TESTED:
+ return
+ else:
+ ALREADY_TESTED = True
+
import xx
for attr in ('error', 'foo', 'new', 'roj'):
Library
-------
-- Issue #4373: Corrected a potential reference leak in the pickle module.
+- Issue #4373: Corrected a potential reference leak in the pickle module and
+ silenced a false positive ref leak in distutils.tests.test_build_ext.
- Issue #4382: dbm.dumb did not specify the expected file encoding for opened
files.