aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Holth <dholth@fastmail.fm>2012-08-25 15:31:37 -0400
committerDaniel Holth <dholth@fastmail.fm>2012-08-25 15:31:37 -0400
commit71d6c4c5a29e30a8dac82ad5a79356a5a849e783 (patch)
tree8e5603a3d2603ec045fc50c8e900e5d887b153e3
parent776fdebc918822b57286ac7a2107f8766f43ce56 (diff)
downloadexternal_python_setuptools-71d6c4c5a29e30a8dac82ad5a79356a5a849e783.tar.gz
external_python_setuptools-71d6c4c5a29e30a8dac82ad5a79356a5a849e783.tar.bz2
external_python_setuptools-71d6c4c5a29e30a8dac82ad5a79356a5a849e783.zip
move _markerlib test into setuptools/test
--HG-- branch : distribute extra : rebase_source : b2d7118f3a3cdf931ba1e56090a35442bc70fd2a
-rw-r--r--setuptools/tests/test_markerlib.py (renamed from _markerlib/test_markerlib.py)20
1 files changed, 14 insertions, 6 deletions
diff --git a/_markerlib/test_markerlib.py b/setuptools/tests/test_markerlib.py
index ff78d672..4cce0430 100644
--- a/_markerlib/test_markerlib.py
+++ b/setuptools/tests/test_markerlib.py
@@ -1,8 +1,6 @@
import os
import unittest
-import pkg_resources
from setuptools.tests.py26compat import skipIf
-from unittest import expectedFailure
try:
import _ast
@@ -11,6 +9,8 @@ except ImportError:
class TestMarkerlib(unittest.TestCase):
+ @skipIf('_ast' not in globals(),
+ "ast not available (Python < 2.5?)")
def test_markers(self):
from _markerlib import interpret, default_environment, compile
@@ -39,15 +39,23 @@ class TestMarkerlib(unittest.TestCase):
self.assert_(interpret("extra == 'test'", environment))
self.assertFalse(interpret("extra == 'doc'", environment))
- @expectedFailure(NameError)
def raises_nameError():
- interpret("python.version == '42'")
+ try:
+ interpret("python.version == '42'")
+ except NameError:
+ pass
+ else:
+ raise Exception("Expected NameError")
raises_nameError()
- @expectedFailure(SyntaxError)
def raises_syntaxError():
- interpret("(x for x in (4,))")
+ try:
+ interpret("(x for x in (4,))")
+ except SyntaxError:
+ pass
+ else:
+ raise Exception("Expected SyntaxError")
raises_syntaxError()