Skip to content

Commit 29c194a

Browse files
committed
tests/test_cli: fix leaking file descriptor
Ensure opened file is closed before the test ends.
1 parent 17e7944 commit 29c194a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ async def test_download_connection_error(self):
217217
# Create args
218218
args = argparse.Namespace(
219219
conntype="ble",
220-
file=open(temp_path, "r"),
220+
file=stack.enter_context(open(temp_path, "r")),
221221
name="MyHub",
222222
start=False,
223223
wait=False,

0 commit comments

Comments
 (0)