diff options
Diffstat (limited to 'testenv/conf/expected_files.py')
-rw-r--r-- | testenv/conf/expected_files.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/testenv/conf/expected_files.py b/testenv/conf/expected_files.py index a8b2ee19..2c8d632c 100644 --- a/testenv/conf/expected_files.py +++ b/testenv/conf/expected_files.py @@ -4,6 +4,15 @@ import sys from conf import hook from exc.test_failed import TestFailed +""" Post-Test Hook: ExpectedFiles +This is a Post-Test hook that checks the test directory for the files it +contains. A dictionary object is passed to it, which contains a mapping of +filenames and contents of all the files that the directory is expected to +contain. +Raises a TestFailed exception if the expected files are not found or if extra +files are found, else returns gracefully. +""" + @hook() class ExpectedFiles: @@ -34,7 +43,7 @@ class ExpectedFiles: fromfile='Actual', tofile='Expected'): print(line, file=sys.stderr) - raise TestFailed('Contents of %s do not match.' % file.name) + raise TestFailed('Contents of %s do not match' % file.name) else: raise TestFailed('Expected file %s not found.' % file.name) if local_fs: |