#!/usr/bin/env python
import sys
import unittest

from os.path import dirname, abspath

import tests

def runtests(*test_args):
    suite = unittest.TestLoader().loadTestsFromModule(tests)
    result = unittest.TextTestRunner(verbosity=2).run(suite)
    sys.exit()

if __name__ == '__main__':
    runtests(*sys.argv[1:])

#!/usr/bin/env python
import sys
import unittest

from os.path import dirname, abspath

import tests

def runtests(*test_args):
    suite = unittest.TestLoader().loadTestsFromModule(tests)
    result = unittest.TextTestRunner(verbosity=2).run(suite)
    sys.exit(bool(result.failures))

if __name__ == '__main__':
    runtests(*sys.argv[1:])

Return exit code indicating failure
Return exit code indicating failure
