Skip to content

Commit 37f9062

Browse files
webknjazJakuje
authored andcommitted
Use /dev/null @ copy non-existing remote file test
1 parent 8d6558c commit 37f9062

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/unit/scp_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
"""Tests suite for scp."""
44

5+
import os
56
import uuid
67

78
import pytest
@@ -69,8 +70,8 @@ def path_to_non_existent_src_file(tmp_path):
6970
return path
7071

7172

72-
def test_get_missing_src(dst_path, path_to_non_existent_src_file, ssh_scp):
73+
def test_get_missing_src(path_to_non_existent_src_file, ssh_scp):
7374
"""Check that SCP file download raises exception if the remote file is missing."""
7475
error_msg = '^Error receiving information about file:'
7576
with pytest.raises(LibsshSCPException, match=error_msg):
76-
ssh_scp.get(str(path_to_non_existent_src_file), str(dst_path))
77+
ssh_scp.get(str(path_to_non_existent_src_file), os.devnull)

0 commit comments

Comments
 (0)