Skip to content

Commit 7b8c4de

Browse files
author
Doug Greiman
committed
Add main so these tests can be run standalone
1 parent 6518324 commit 7b8c4de

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

scripts/gen_dockerfile_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,7 @@ def mock_error(*args):
223223
with error_patch:
224224
with pytest.raises(AssertionError):
225225
gen_dockerfile.parse_args(argv)
226+
227+
228+
if __name__ == '__main__':
229+
pytest.main([__file__])

scripts/local_cloudbuild_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,3 +404,7 @@ def test_parse_args_output_script(argv, expected):
404404
def test_parse_args_run_flag(argv, expected):
405405
args = local_cloudbuild.parse_args(argv)
406406
assert args.run == expected
407+
408+
409+
if __name__ == '__main__':
410+
pytest.main([__file__])

scripts/validation_utils_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,7 @@ def test_validate_arg_dicts_valid(arg, expected):
9292
def test_validate_arg_dicts_invalid(arg):
9393
with pytest.raises(argparse.ArgumentTypeError):
9494
validation_utils.validate_arg_dict(arg)
95+
96+
97+
if __name__ == '__main__':
98+
pytest.main([__file__])

0 commit comments

Comments
 (0)