diff options
| author | PJ Eby <distutils-sig@python.org> | 2004-03-22 01:12:31 +0000 |
|---|---|---|
| committer | PJ Eby <distutils-sig@python.org> | 2004-03-22 01:12:31 +0000 |
| commit | 2e83526e517ecb61170f061af4cbc213dfa1ef0b (patch) | |
| tree | 8a1a1a73f267c64a4566c5eedc03b19f644bb992 /setuptools/tests | |
| parent | 7ce55cabc53fe2c1378446ba0557e5f716c0cd31 (diff) | |
| download | python-setuptools-git-2e83526e517ecb61170f061af4cbc213dfa1ef0b.tar.gz | |
Compute command line that should be passed to child setup scripts.
Warn user if unsupported options are supplied, and cancel unless
'depends -i' (aka '--ignore-extra-args') was used.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040880
Diffstat (limited to 'setuptools/tests')
| -rw-r--r-- | setuptools/tests/__init__.py | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 913c65bf..66b12646 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -127,7 +127,10 @@ class DependsTests(TestCase): dist = makeSetup( extra_path='spam', - script_args=['install','--install-lib',path1] + script_args=[ + 'install','--install-lib',path1, '--prefix',path2, + 'build','--compiler=mingw32', + ] ) cmd = dist.get_command_obj('depends') @@ -136,16 +139,13 @@ class DependsTests(TestCase): self.assertEqual(cmd.temp, dist.get_command_obj('build').build_temp) self.assertEqual(cmd.search_path, [path2,path1]+sys.path) - - - - - - - - - - + self.assertEqual(cmd.unsafe_options, + {'install':['--install-lib',path1]} + ) + self.assertEqual(cmd.safe_options, { + 'build':['--compiler','mingw32'], + 'install':['--prefix',os.path.abspath(path2)] + }) @@ -172,6 +172,10 @@ class DistroTests(TestCase): packages=['a', 'a.b', 'a.b.c', 'b', 'c'], py_modules=['b.d','x'], ext_modules = (self.e1, self.e2), + script_args = [ + 'build', '-q', 'build_ext', '-i', + 'install', '--prefix=/usr/lib', '--install-lib','/test' + ], package_dir = {}, ) @@ -199,10 +203,6 @@ class DistroTests(TestCase): - - - - def testIncludeExclude(self): # remove an extension self.dist.exclude(ext_modules=[self.e1]) @@ -271,12 +271,12 @@ class DistroTests(TestCase): self.dist.exclude, package_dir=['q'] ) - - - - - - + def testCmdLineOpts(self): + self.assertEqual(self.dist.get_cmdline_options(), + { 'install':{'prefix':'/usr/lib', 'install-lib':'/test'}, + 'build': {'quiet':None}, 'build_ext':{'inplace':None}, + } + ) |
