summaryrefslogtreecommitdiff
path: root/unit_tests/test_plugins.py
diff options
context:
space:
mode:
authorJason Pellerin <jpellerin@gmail.com>2007-04-26 03:27:28 +0000
committerJason Pellerin <jpellerin@gmail.com>2007-04-26 03:27:28 +0000
commitde05f5decb119181bc94b73d04c3d1199b990b01 (patch)
treed8497919b52a0bf4f91706650e969ea4aa050eb3 /unit_tests/test_plugins.py
parent4b2ec480d6b6a503eadfe078da1f17026d74b177 (diff)
downloadnose-de05f5decb119181bc94b73d04c3d1199b990b01.tar.gz
Added python 2.4 doctest as nose.ext.dtcompat to enable better doctest support for python 2.3
Diffstat (limited to 'unit_tests/test_plugins.py')
-rw-r--r--unit_tests/test_plugins.py22
1 files changed, 5 insertions, 17 deletions
diff --git a/unit_tests/test_plugins.py b/unit_tests/test_plugins.py
index c6e5eff..3401afa 100644
--- a/unit_tests/test_plugins.py
+++ b/unit_tests/test_plugins.py
@@ -82,16 +82,11 @@ class TestDoctestPlugin(unittest.TestCase):
o2, d2 = parser.opts[1]
assert o2[0] == '--doctest-tests'
-
- if compat_24:
- o3, d3 = parser.opts[2]
- assert o3[0] == '--doctest-extension'
- else:
- assert len(parser.opts) == 2
+
+ o3, d3 = parser.opts[2]
+ assert o3[0] == '--doctest-extension'
def test_config(self):
- if not compat_24:
- return
# test that configuration works properly when both environment
# and command line specify a doctest extension
parser = OptionParser()
@@ -154,11 +149,8 @@ class TestDoctestPlugin(unittest.TestCase):
plug = Doctest()
plug.can_configure = True
plug.configure(opt, conf)
- suite = plug.loadTestsFromModule(foo.bar.buz)
- if compat_24:
- expect = ['afunc (foo.bar.buz)']
- else:
- expect = ['unittest.FunctionTestCase (runit)']
+ suite = plug.loadTestsFromModule(foo.bar.buz)
+ expect = ['afunc (foo.bar.buz)']
for test in suite:
self.assertEqual(str(test), expect.pop(0))
@@ -182,10 +174,6 @@ class TestDoctestPlugin(unittest.TestCase):
self.assertEqual(call, 'afunc')
def test_collect_txtfile(self):
- #if not compat_24:
- # warn("No support for doctests in files other than python modules"
- # " in python versions older than 2.4")
- # return
here = os.path.abspath(os.path.dirname(__file__))
support = os.path.join(here, 'support')
fn = os.path.join(support, 'foo', 'doctests.txt')