Merged revisions 65640,65675,65699,65701 via svnmerge from

svn+ssh://pythondev@svn.python.org/doctools/branches/0.4.x

........
  r65640 | georg.brandl | 2008-08-11 16:11:17 +0200 (Mon, 11 Aug 2008) | 2 lines

  More info in intro.
........
  r65675 | georg.brandl | 2008-08-14 13:53:02 +0200 (Thu, 14 Aug 2008) | 2 lines

  #3546: add missing linebreak.
........
  r65699 | benjamin.peterson | 2008-08-15 23:02:22 +0200 (Fri, 15 Aug 2008) | 4 lines

  rename util.with_testapp to util.with_app; nose was running it

  also make an assert more informative
........
  r65701 | benjamin.peterson | 2008-08-16 00:00:54 +0200 (Sat, 16 Aug 2008) | 1 line

  add some tests for sphinx.application
........
This commit is contained in:
Georg Brandl
2008-08-23 15:04:45 +00:00
parent 5f0c30ac90
commit f0605a40a4
7 changed files with 77 additions and 15 deletions

View File

@@ -25,7 +25,7 @@ from nose import tools
__all__ = [
'test_root',
'raises', 'raises_msg', 'Struct',
'ListOutput', 'TestApp', 'with_testapp',
'ListOutput', 'TestApp', 'with_app',
'path', 'with_tempdir', 'write_file',
'sprint',
]
@@ -60,7 +60,7 @@ def raises_msg(exc, msg, func, *args, **kwds):
try:
func(*args, **kwds)
except exc, err:
assert msg in str(err)
assert msg in str(err), "\"%s\" not in \"%s\"" % (msg, err)
else:
raise AssertionError('%s did not raise %s' %
(func.__name__, _excstr(exc)))
@@ -140,7 +140,7 @@ class TestApp(application.Sphinx):
shutil.rmtree(tree, True)
def with_testapp(*args, **kwargs):
def with_app(*args, **kwargs):
"""
Make a TestApp with args and kwargs, pass it to the test and clean up
properly.