blob: cd64c5764e9d214ac6a0e644ded18b9237669400 [file] [log] [blame]
#!/usr/bin/python
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Run all python tests in this directory."""
import sys
import unittest
MODULES = [
'directory_storage_test',
'gsd_storage_test',
'hashing_tools_test',
'local_storage_cache_test',
]
# We use absolute imports for Py3 compatibility.
# This means for imports to resolve when testing we need to add the pynacl
# directory to the module search path.
sys.path.insert(0, './')
suite = unittest.TestLoader().loadTestsFromNames(MODULES)
result = unittest.TextTestRunner(verbosity=2).run(suite)
if result.wasSuccessful():
sys.exit(0)
else:
sys.exit(1)