def test_it_will_return_1_exit_code_on_failure(bad_py_file): try: run(targets=[bad_py_file.strpath]) except SystemExit as exception: assert exception.code == 1
def test_will_return_zero_on_success_with_license_check(good_py_file): try: run(targets=[good_py_file.strpath], check_licenses=True) except SystemExit as exception: assert exception.code == 0
def test_it_will_return_zero_exit_code_on_success(good_py_file): try: run(targets=[good_py_file.strpath]) except SystemExit as exception: assert exception.code == 0
def test_it_returns_zero_exit_code_on_builtin_shadowing_fail( builtin_fail_py_file): try: run(targets=[builtin_fail_py_file.strpath]) except SystemExit as exception: assert exception.code == 0
def main(): run(targets=ARGS.targets, config_dir=DIRECTORY, check_licenses=ARGS.check_licenses)