diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2010-07-22 12:50:05 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2010-07-22 12:50:05 (GMT) |
commit | 3679727939a9d25ccfe057e71e8a4b8be73d47ce (patch) | |
tree | 88326b8ec80cf57f51d2e093143e233ec4ce1be5 /Lib/distutils/tests/test_extension.py | |
parent | 5db0c94072abad10c9d2df99eefd1f51eb84f2bc (diff) | |
download | cpython-3679727939a9d25ccfe057e71e8a4b8be73d47ce.zip cpython-3679727939a9d25ccfe057e71e8a4b8be73d47ce.tar.gz cpython-3679727939a9d25ccfe057e71e8a4b8be73d47ce.tar.bz2 |
reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Diffstat (limited to 'Lib/distutils/tests/test_extension.py')
-rwxr-xr-x | Lib/distutils/tests/test_extension.py | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/Lib/distutils/tests/test_extension.py b/Lib/distutils/tests/test_extension.py index 857284d..1ee3058 100755 --- a/Lib/distutils/tests/test_extension.py +++ b/Lib/distutils/tests/test_extension.py @@ -1,16 +1,13 @@ """Tests for distutils.extension.""" -import os -import sys import unittest +import os import warnings from test.support import check_warnings from distutils.extension import read_setup_file, Extension -from distutils.tests.support import capture_warnings class ExtensionTestCase(unittest.TestCase): - @capture_warnings def test_read_setup_file(self): # trying to read a Setup file # (sample extracted from the PyGame project) @@ -33,22 +30,16 @@ class ExtensionTestCase(unittest.TestCase): self.assertEquals(names, wanted) - @unittest.skipIf(sys.flags.optimize >= 2, - "Assertions are omitted with -O2 and above") - def test_extension_init_assertions(self): - # The first argument, which is the name, must be a string. + def test_extension_init(self): + # the first argument, which is the name, must be a string self.assertRaises(AssertionError, Extension, 1, []) + ext = Extension('name', []) + self.assertEquals(ext.name, 'name') # the second argument, which is the list of files, must # be a list of strings self.assertRaises(AssertionError, Extension, 'name', 'file') self.assertRaises(AssertionError, Extension, 'name', ['file', 1]) - - def test_extension_init(self): - ext = Extension('name', []) - self.assertEquals(ext.name, 'name') - - ext = Extension('name', ['file1', 'file2']) self.assertEquals(ext.sources, ['file1', 'file2']) |