Tests: expose 'args' passed to hook scripts

- Useful to validate that all the expected arguments were passed with
  correct escaping.
- Update test/template.t with one use-case for 'args'
This commit is contained in:
Renato Alves
2015-04-06 13:22:40 +01:00
parent 09d86eb165
commit fd17a68930
4 changed files with 12 additions and 8 deletions

View File

@@ -29,7 +29,6 @@
import sys
import os
import unittest
from datetime import datetime
# Ensure python finds the local simpletap module
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
@@ -63,6 +62,7 @@ class TestHooksOnLaunch(TestCase):
self.assertEqual('data' in taskenv, True, 'data:...')
self.assertEqual('version' in taskenv, True, 'version:...')
if __name__ == "__main__":
from simpletap import TAPTestRunner
unittest.main(testRunner=TAPTestRunner())