From 678cc6fcc082f5921cc7f90a5fcee5a923ddb9e9 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Wed, 16 Mar 2022 17:32:43 +0800 Subject: [PATCH] Fix pytest incorrect skip "reason" string No change to functionality --- test/test_svrauth.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_svrauth.py b/test/test_svrauth.py index 0ded6d4..88f13fa 100644 --- a/test/test_svrauth.py +++ b/test/test_svrauth.py @@ -8,21 +8,21 @@ from pathlib import Path # Tests for server side authentication # Requires keyfile and authorized_keys set up in github action build.yml -@pytest.mark.skipif('DBTEST_IN_ACTION' not in os.environ, reason="DBTEST_PUBKEYINFO not set") +@pytest.mark.skipif('DBTEST_IN_ACTION' not in os.environ, reason="DBTEST_IN_ACTION not set") def test_pubkeyinfo(request, dropbear): kf = str(Path.home() / ".ssh/id_dropbear_key2") r = dbclient(request, "-i", kf, "echo -n $SSH_PUBKEYINFO", capture_output=True) # stop at first space assert r.stdout.decode() == "key2" -@pytest.mark.skipif('DBTEST_IN_ACTION' not in os.environ, reason="DBTEST_PUBKEYINFO not set") +@pytest.mark.skipif('DBTEST_IN_ACTION' not in os.environ, reason="DBTEST_IN_ACTION not set") def test_pubkeyinfo_special(request, dropbear): kf = str(Path.home() / ".ssh/id_dropbear_key3") r = dbclient(request, "-i", kf, "echo -n $SSH_PUBKEYINFO", capture_output=True) # comment contains special characters so the SSH_PUBKEYINFO should not be set assert r.stdout.decode() == "" -@pytest.mark.skipif('DBTEST_IN_ACTION' not in os.environ, reason="DBTEST_PUBKEYINFO not set") +@pytest.mark.skipif('DBTEST_IN_ACTION' not in os.environ, reason="DBTEST_IN_ACTION not set") def test_pubkeyinfo_okchar(request, dropbear): kf = str(Path.home() / ".ssh/id_dropbear_key4") r = dbclient(request, "-i", kf, "echo -n $SSH_PUBKEYINFO", capture_output=True)