Benji York wrote:
On Fri, Dec 19, 2008 at 1:03 PM, Chris Withers <chris@simplistix.co.uk> wrote:
Hi Guys,
Line 396 of doctest.py contains code which is, at best, platform-specific (and so a bug) or, more likely, irrelevent.
Line 396 of doctest.py from zope.testing 3.7.1 doesn't include a raise. I'm assuming you mean line 401 instead.
Nope, typo on my part, I meant like 386/387: if path.startswith('/'): raise ValueError('Module-relative files may not have absolute ...which, as I said, runs fine on Windows (which makes me think that whole ValueError raise is bogus) and yet fails on Linux.
Also, DocFileSuite can take multiple paths, so your function can be simplified to this:
def test_suite(): paths = glob(os.path.join('..', 'docs', '*.txt')) return DocFileSuite(*paths, optionflags=REPORT_NDIFF|ELLIPSIS)
Not quite, that'll actually give you a syntax error ;-) Here's what I ended up with: def test_suite(): return DocFileSuite( optionflags=REPORT_NDIFF|ELLIPSIS, *glob(join(dirname(__file__),pardir,'docs','*.txt')) ) FWIW, I still think the check and raise that I meant to refer to are pointless and buggy. cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk