diff options
| author | Tarek Ziadé <ziade.tarek@gmail.com> | 2010-07-22 12:50:05 +0000 |
|---|---|---|
| committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2010-07-22 12:50:05 +0000 |
| commit | 07be936471d1459a64a755dc90a53121a8ca41e9 (patch) | |
| tree | b0006ca9f93d98c5246224cd42692528e4ee20d4 /tests/test_extension.py | |
| parent | b97dbcf42d529ab4dfb2896cef8c0d53960595d7 (diff) | |
| download | python-setuptools-git-07be936471d1459a64a755dc90a53121a8ca41e9.tar.gz | |
reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Diffstat (limited to 'tests/test_extension.py')
| -rwxr-xr-x | tests/test_extension.py | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/tests/test_extension.py b/tests/test_extension.py index 857284dd..1ee30585 100755 --- a/tests/test_extension.py +++ b/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']) |
