summaryrefslogtreecommitdiff
path: root/docutils/test
diff options
context:
space:
mode:
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2008-12-08 20:44:32 +0000
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2008-12-08 20:44:32 +0000
commit28c73a3db728a5b25cbb20aea0e4ff1b5921fb6d (patch)
treec77f579e291cda31e59c5dbce7bed1fec4e4af73 /docutils/test
parent2b8b093f19e24d44d1b9bba2e084a6a60c8d3789 (diff)
downloaddocutils-28c73a3db728a5b25cbb20aea0e4ff1b5921fb6d.tar.gz
test_functional.py: give some hints if there is no expected output (yet)
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5809 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test')
-rwxr-xr-xdocutils/test/test_functional.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/docutils/test/test_functional.py b/docutils/test/test_functional.py
index 91e1f5f40..b95cfe1c3 100755
--- a/docutils/test/test_functional.py
+++ b/docutils/test/test_functional.py
@@ -136,8 +136,15 @@ class FunctionalTestCase(DocutilsTestSupport.CustomTestCase):
# by publish_file):
output = docutils.core.publish_file(**params)
# Get the expected output *after* writing the actual output.
- self.assert_(os.access(expected_path, os.R_OK),\
- 'Cannot find expected output at\n' + expected_path)
+ no_expected = ('Cannot find expected output at %s\n'
+ 'If the actual output is correct, move it'
+ 'to the expected/ dir and check it in:\n'
+ ' mv %s %s\n'
+ ' svn commit -m "<comment>" %s\n\n'
+ % (expected_path,
+ params['destination_path'], expected_path, expected_path)
+ ) + output
+ self.assert_(os.access(expected_path, os.R_OK), no_expected)
f = open(expected_path, 'rU')
expected = f.read()
f.close()
@@ -147,9 +154,11 @@ class FunctionalTestCase(DocutilsTestSupport.CustomTestCase):
'If the actual output is correct, please replace the\n'
'expected output and check it in to Subversion:\n'
' mv %s %s\n'
+ ' svn add %s'
' svn commit -m "<comment>" %s'
% (expected_path, params['destination_path'],
- params['destination_path'], expected_path, expected_path))
+ params['destination_path'], expected_path,
+ expected_path, expected_path))
try:
self.assertEquals(output, expected, diff)
except AssertionError: