summaryrefslogtreecommitdiff
path: root/tests/test_extension.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2010-07-22 12:50:05 +0000
committerTarek Ziadé <ziade.tarek@gmail.com>2010-07-22 12:50:05 +0000
commit07be936471d1459a64a755dc90a53121a8ca41e9 (patch)
treeb0006ca9f93d98c5246224cd42692528e4ee20d4 /tests/test_extension.py
parentb97dbcf42d529ab4dfb2896cef8c0d53960595d7 (diff)
downloadpython-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-xtests/test_extension.py19
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'])