def main():
    parser = get_parser()
    args = parser.parse_args()
    # Make sure environ is set before running test.
    requirements = REQUIREMENTS[args.package]
    system_test_utils.check_environ(*requirements)

    test_result = run_module_tests(args.package)
    if not test_result.wasSuccessful():
        sys.exit(1)
Example #2
0
def main():
    parser = get_parser()
    args = parser.parse_args()
    # Make sure environ is set before running test.
    requirements = REQUIREMENTS[args.package]
    system_test_utils.check_environ(*requirements)

    test_result = run_module_tests(args.package)
    if not test_result.wasSuccessful():
        sys.exit(1)
def main():
    parser = get_parser()
    args = parser.parse_args()
    # Make sure environ is set before running test.
    if args.package == 'datastore':
        system_test_utils.check_environ(require_datastore=True)
    elif args.package == 'storage':
        system_test_utils.check_environ(require_storage=True)
    test_result = run_module_tests(args.package)
    if not test_result.wasSuccessful():
        sys.exit(1)
def main():
    parser = get_parser()
    args = parser.parse_args()
    # Make sure environ is set before running test.
    if args.package == 'datastore':
        system_test_utils.check_environ(require_datastore=True)
    elif args.package == 'storage':
        system_test_utils.check_environ(require_storage=True)
    test_result = run_module_tests(args.package)
    if not test_result.wasSuccessful():
        sys.exit(1)
def run_module_tests(module_name):
    # Make sure environ is set before running test.
    requirements = REQUIREMENTS[module_name]
    system_test_utils.check_environ(*requirements)

    suite = unittest2.TestSuite()
    test_mod = TEST_MODULES[module_name]
    tests = unittest2.defaultTestLoader.loadTestsFromModule(test_mod)
    suite.addTest(tests)

    # Run tests.
    test_result = unittest2.TextTestRunner(verbosity=2).run(suite)
    # Exit if not successful.
    if not test_result.wasSuccessful():
        sys.exit(1)
def run_module_tests(module_name):
    # Make sure environ is set before running test.
    requirements = REQUIREMENTS[module_name]
    system_test_utils.check_environ(*requirements)

    suite = unittest2.TestSuite()
    test_mod = TEST_MODULES[module_name]
    tests = unittest2.defaultTestLoader.loadTestsFromModule(test_mod)
    suite.addTest(tests)

    # Run tests.
    test_result = unittest2.TextTestRunner(verbosity=2).run(suite)
    # Exit if not successful.
    if not test_result.wasSuccessful():
        sys.exit(1)
def main():
    parser = get_parser()
    args = parser.parse_args()
    # Make sure environ is set before running test.
    if args.package == 'datastore':
        system_test_utils.check_environ(require_datastore=True)
    elif args.package == 'storage':
        system_test_utils.check_environ(require_storage=True)
    elif args.package == 'pubsub':
        system_test_utils.check_environ(require_pubsub=True)
    else:
        raise ValueError('Unexpected package name.')
    test_result = run_module_tests(args.package)
    if not test_result.wasSuccessful():
        sys.exit(1)