From bccb0c928f84c893ed58af649658267e674e864f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 12 Apr 2009 16:49:20 +0000 Subject: [PATCH] Merged revisions 71528 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71528 | tarek.ziade | 2009-04-12 18:45:32 +0200 (Sun, 12 Apr 2009) | 1 line added a test for finalize_options ........ --- Lib/distutils/command/config.py | 1 + Lib/distutils/tests/test_config_cmd.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/Lib/distutils/command/config.py b/Lib/distutils/command/config.py index c31220553ce..ac80a54eb1a 100644 --- a/Lib/distutils/command/config.py +++ b/Lib/distutils/command/config.py @@ -12,6 +12,7 @@ this header file lives". __revision__ = "$Id$" import sys, os, re + from distutils.core import Command from distutils.errors import DistutilsExecError from distutils.sysconfig import customize_compiler diff --git a/Lib/distutils/tests/test_config_cmd.py b/Lib/distutils/tests/test_config_cmd.py index af16d4c8219..45d480ba5aa 100644 --- a/Lib/distutils/tests/test_config_cmd.py +++ b/Lib/distutils/tests/test_config_cmd.py @@ -46,6 +46,21 @@ class ConfigTestCase(support.LoggingSilencer, match = cmd.search_cpp(pattern='command', body='// xxx') self.assertEquals(match, 1) + def test_finalize_options(self): + # finalize_options does a bit of transformation + # on options + pkg_dir, dist = self.create_dist() + cmd = config(dist) + cmd.include_dirs = 'one%stwo' % os.pathsep + cmd.libraries = 'one' + cmd.library_dirs = 'three%sfour' % os.pathsep + cmd.ensure_finalized() + + self.assertEquals(cmd.include_dirs, ['one', 'two']) + self.assertEquals(cmd.libraries, ['one']) + self.assertEquals(cmd.library_dirs, ['three', 'four']) + + def test_suite(): return unittest.makeSuite(ConfigTestCase)