https://github.com/log2timeline/plaso
Tip revision: bd6b7213dc98dcc12aa86be31449b44558bb70c4 authored by Joachim Metz on 20 October 2017, 04:41:31 UTC
Code review: 330570043: Made Unicode strings the default in bencode, cookie, ESEDB, OLECF, plist and syslog parser plugins tests #1268
Code review: 330570043: Made Unicode strings the default in bencode, cookie, ESEDB, OLECF, plist and syslog parser plugins tests #1268
Tip revision: bd6b721
run_tests.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Script to run the tests."""
import sys
import unittest
# Change PYTHONPATH to include dependencies.
sys.path.insert(0, u'.')
import utils.dependencies # pylint: disable=wrong-import-position
if __name__ == '__main__':
fail_unless_has_test_file = '--fail-unless-has-test-file' in sys.argv
setattr(unittest, 'fail_unless_has_test_file', fail_unless_has_test_file)
if fail_unless_has_test_file:
# Remove --fail-unless-has-test-file otherwise it will conflict with
# the argparse tests.
sys.argv.remove('--fail-unless-has-test-file')
dependency_helper = utils.dependencies.DependencyHelper()
if not dependency_helper.CheckTestDependencies():
sys.exit(1)
test_suite = unittest.TestLoader().discover('tests', pattern='*.py')
test_results = unittest.TextTestRunner(verbosity=2).run(test_suite)
if not test_results.wasSuccessful():
sys.exit(1)