We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66065cd commit 94d54e1Copy full SHA for 94d54e1
tests/unit/channel_test.py
@@ -32,11 +32,14 @@ def ssh_channel(ssh_client_session):
32
'Ref: https://github.com/ansible/pylibssh/issues/57', # noqa: WPS326
33
strict=False,
34
)
35
-@pytest.mark.forked() # noqa: PT023 -- it's unclear if braces are needed here
+@pytest.mark.forked
36
def test_exec_command(ssh_channel):
37
"""Test getting the output of a remotely executed command."""
38
u_cmd_out = ssh_channel.exec_command('echo -n Hello World').stdout.decode()
39
assert u_cmd_out == u'Hello World' # noqa: WPS302
40
+ # Test that repeated calls to exec_command do not segfault.
41
+ u_cmd_out = ssh_channel.exec_command('echo -n Hello Again').stdout.decode()
42
+ assert u_cmd_out == u'Hello Again' # noqa: WPS302
43
44
45
def test_double_close(ssh_channel):
0 commit comments