Marco Ricci commited on 2026-06-14 07:54:14
Zeige 1 geänderte Dateien mit 8 Einfügungen und 3 Löschungen.
The test mocks communication aspects of an SSH agent session, and thus needs a running SSH agent. Also, the xfail markers for some of the parametrization values were overly broad, and were masking failures in the test setup because of a missing running SSH agent.
| ... | ... |
@@ -8,7 +8,6 @@ from __future__ import annotations |
| 8 | 8 |
|
| 9 | 9 |
import base64 |
| 10 | 10 |
import contextlib |
| 11 |
-import ctypes |
|
| 12 | 11 |
import importlib.metadata |
| 13 | 12 |
import io |
| 14 | 13 |
import re |
| ... | ... |
@@ -1388,7 +1387,9 @@ class TestAgentErrorResponses: |
| 1388 | 1387 |
id="openssh-10.2-mocked", |
| 1389 | 1388 |
marks=[ |
| 1390 | 1389 |
pytest.mark.xfail( |
| 1391 |
- reason="specific to OpenSSH 10.3 output", strict=True |
|
| 1390 |
+ reason="specific to OpenSSH 10.3 output", |
|
| 1391 |
+ raises=AssertionError, |
|
| 1392 |
+ strict=True, |
|
| 1392 | 1393 |
) |
| 1393 | 1394 |
], |
| 1394 | 1395 |
), |
| ... | ... |
@@ -1419,7 +1420,9 @@ class TestAgentErrorResponses: |
| 1419 | 1420 |
id="pageant-mocked", |
| 1420 | 1421 |
marks=[ |
| 1421 | 1422 |
pytest.mark.xfail( |
| 1422 |
- reason="specific to OpenSSH 10.3 output", strict=True |
|
| 1423 |
+ reason="specific to OpenSSH 10.3 output", |
|
| 1424 |
+ raises=AssertionError, |
|
| 1425 |
+ strict=True, |
|
| 1423 | 1426 |
) |
| 1424 | 1427 |
], |
| 1425 | 1428 |
), |
| ... | ... |
@@ -1427,6 +1430,7 @@ class TestAgentErrorResponses: |
| 1427 | 1430 |
) |
| 1428 | 1431 |
def test_tolerating_extra_success_after_extension_response( |
| 1429 | 1432 |
self, |
| 1433 |
+ running_ssh_agent: data.RunningSSHAgentInfo, |
|
| 1430 | 1434 |
success_after_query: bool, |
| 1431 | 1435 |
extensions: list[str] | data.AgentProtocolResponse, |
| 1432 | 1436 |
) -> None: |
| ... | ... |
@@ -1446,6 +1450,7 @@ class TestAgentErrorResponses: |
| 1446 | 1450 |
[OPENSSH_BZ3967]: https://bugzilla.mindrot.org/show_bug.cgi?id=3967 |
| 1447 | 1451 |
|
| 1448 | 1452 |
""" |
| 1453 |
+ del running_ssh_agent |
|
| 1449 | 1454 |
query_response = ( |
| 1450 | 1455 |
extensions |
| 1451 | 1456 |
if isinstance(extensions, data.AgentProtocolResponse) |
| 1452 | 1457 |