Skip to content

Commit d722f00

Browse files
author
Doug Greiman
committed
Fix lint warning
1 parent 223843c commit d722f00

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

scripts/gen_dockerfile_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ def mock_error(*args):
218218
"""Prevent argparse from calling sys.exit()"""
219219
raise AssertionError(*args)
220220

221-
with unittest.mock.patch.object(
222-
argparse.ArgumentParser, 'error', mock_error):
221+
error_patch = unittest.mock.patch.object(
222+
argparse.ArgumentParser, 'error', mock_error)
223+
with error_patch:
223224
with pytest.raises(AssertionError):
224225
gen_dockerfile.parse_args(argv)

0 commit comments

Comments
 (0)