src/o/o/oodoctest-0.1.0/oodoctest.py oodoctest(Download)
import doctest
import unittest
from copy import copy
from doctest import DocFileCase, DocTestParser
try:
import lxml.etree as ElementTree
[test] = _extract_doctests(path, split_level=None,
module_relative=module_relative,
package=package, globs=globs, parser=parser)
return DocFileCase(test, **options)
def OODocFileSuite(*paths, **kw):
suite = unittest.TestSuite()
for path in paths:
for test in _extract_doctests(path, **kw):
suite.addTest(DocFileCase(test, **kw2))
return suite
OODocFileSuite.__doc__ = doctest.DocFileSuite.__doc__
src/z/a/zamboni-lib-HEAD/lib/python/pyquery/test.py zamboni-lib(Download)
class TestReadme(doctest.DocFileCase):
path = os.path.join(dirname, 'README.txt')
def __init__(self, *args, **kwargs):
parser = doctest.DocTestParser()
doc = open(self.path).read()
test = parser.get_doctest(doc, globals(), '', self.path, 0)
class TestTests(doctest.DocFileCase):
path = os.path.join(dirname, 'tests.txt')
def __init__(self, *args, **kwargs):
parser = doctest.DocTestParser()
doc = open(self.path).read()
test = parser.get_doctest(doc, globals(), '', self.path, 0)
src/z/a/zamboni-lib-HEAD/lib/python/IPython/testing/plugin/ipdoctest.py zamboni-lib(Download)
class DocFileCase(doctest.DocFileCase):
"""Overrides to provide filename
"""
def address(self):
return (self._dt_test.filename, None, None)
src/i/p/ipython-py3k-HEAD/IPython/testing/plugin/ipdoctest.py ipython-py3k(Download)
class DocFileCase(doctest.DocFileCase):
"""Overrides to provide filename
"""
def address(self):
return (self._dt_test.filename, None, None)
src/b/a/badger-lib-HEAD/packages/pyquery/pyquery/test.py badger-lib(Download)
class TestReadme(doctest.DocFileCase):
path = os.path.join(dirname, '..', 'README.txt')
def __init__(self, *args, **kwargs):
parser = doctest.DocTestParser()
doc = open(self.path).read()
test = parser.get_doctest(doc, globals(), '', self.path, 0)
class TestTests(doctest.DocFileCase):
path = os.path.join(dirname, 'tests.txt')
def __init__(self, *args, **kwargs):
parser = doctest.DocTestParser()
doc = open(self.path).read()
test = parser.get_doctest(doc, globals(), '', self.path, 0)
src/s/p/spackager-0.5.3/pyquery/test.py spackager(Download)
class TestReadme(doctest.DocFileCase):
path = os.path.join(dirname, 'README.txt')
def __init__(self, *args, **kwargs):
parser = doctest.DocTestParser()
doc = open(self.path).read()
test = parser.get_doctest(doc, globals(), '', self.path, 0)
class TestTests(doctest.DocFileCase):
path = os.path.join(dirname, 'tests.txt')
def __init__(self, *args, **kwargs):
parser = doctest.DocTestParser()
doc = open(self.path).read()
test = parser.get_doctest(doc, globals(), '', self.path, 0)
src/p/y/pyquery-0.6.1/pyquery/test.py pyquery(Download)
class TestReadme(doctest.DocFileCase):
path = os.path.join(dirname, '..', 'README.txt')
def __init__(self, *args, **kwargs):
parser = doctest.DocTestParser()
doc = open(self.path).read()
test = parser.get_doctest(doc, globals(), '', self.path, 0)
class TestTests(doctest.DocFileCase):
path = os.path.join(dirname, 'tests.txt')
def __init__(self, *args, **kwargs):
parser = doctest.DocTestParser()
doc = open(self.path).read()
test = parser.get_doctest(doc, globals(), '', self.path, 0)
src/i/p/ipython-0.10/IPython/testing/plugin/ipdoctest.py ipython(Download)
class DocFileCase(doctest.DocFileCase):
"""Overrides to provide filename
"""
def address(self):
return (self._dt_test.filename, None, None)
src/g/p/gp.fileupload-1.0/gp/fileupload/tests.py gp.fileupload(Download)
class Dummy(doctest.DocFileCase):
def __init__(self, *args, **kwargs):
# get tests from file
parser = doctest.DocTestParser()
doc = open(self.path).read()
test = parser.get_doctest(doc, globals(), name, self.path, 0)