test_byclient[login-False] fails before the pytest.xfail call
- Ngôn ngữ chính
- Python
- Star
- 373
- Fork
- 105
- Merge trung bình
- 4 phút
- Pull request đã merge (30 ngày)
- 2
Mô tả
I get this test failure for aiosmtpd 1.4.2 on openSUSE Tumbleweed:
```
[ 48s] ============================= test session starts ==============================
[ 48s] platform linux -- Python 3.9.4, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3.9
[ 48s] cachedir: .pytest_cache
[ 48s] rootdir: /home/abuild/rpmbuild/BUILD/aiosmtpd-1.4.2, configfile: pyproject.toml
[ 48s] plugins: mock-3.1.1
[ 49s] collecting ... collected 552 items
....
[ 92s] =================================== FAILURES ===================================
[ 92s] ________________ TestAuthMechanisms.test_byclient[login-False] _________________
[ 92s]
[ 92s] self =
[ 92s] caplog = <_pytest.logging.LogCaptureFixture object at 0x7f1425d35520>
[ 92s] auth_peeker_controller =
[ 92s] client = , mechanism = 'login'
[ 92s] init_resp = False
[ 92s]
[ 92s] @pytest.mark.parametrize("init_resp", [True, False])
[ 92s] @pytest.mark.parametrize("mechanism", ["login", "plain"])
[ 92s] def test_byclient(
[ 92s] self, caplog, auth_peeker_controller, client, mechanism, init_resp
[ 92s] ):
[ 92s] self._ehlo(client)
[ 92s] PW = "goodpasswd"
[ 92s] client.user = "goodlogin"
[ 92s] client.password = PW
[ 92s] auth_meth = getattr(client, "auth_" + mechanism)
[ 92s] if (mechanism, init_resp) == ("login", False):
[ 92s] with pytest.raises(SMTPAuthenticationError):
[ 92s] > client.auth(mechanism, auth_meth, initial_response_ok=init_resp)
[ 92s] E Failed: DID NOT RAISE
[ 92s]
[ 92s] aiosmtpd/tests/test_smtp.py:1055: Failed
[ 92s] ------------------------------ Captured log setup ------------------------------
[ 92s] INFO mail.log:smtp.py:399 Available AUTH mechanisms: DENYFALSE DENYMISSING LOGIN(builtin) NONE NULL PLAIN(builtin) WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE
[ 92s] INFO mail.log:smtp.py:511 Peer: ('127.0.0.1', 47604)
[ 92s] INFO mail.log:smtp.py:591 ('127.0.0.1', 47604) handling connection
[ 92s] DEBUG mail.log:smtp.py:577 ('127.0.0.1', 47604) << b'220 skylab Python SMTP 1.4.2'
[ 92s] INFO mail.log:smtp.py:531 ('127.0.0.1', 47604) EOF received
[ 92s] INFO mail.log:smtp.py:733 ('127.0.0.1', 47604) Connection lost during _handle_client()
[ 92s] INFO mail.log:smtp.py:517 ('127.0.0.1', 47604) connection lost
[ 92s] INFO mail.log:smtp.py:399 Available AUTH mechanisms: DENYFALSE DENYMISSING LOGIN(builtin) NONE NULL PLAIN(builtin) WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE
[ 92s] INFO mail.log:smtp.py:511 Peer: ('127.0.0.1', 47606)
[ 92s] INFO mail.log:smtp.py:591 ('127.0.0.1', 47606) handling connection
[ 92s] DEBUG mail.log:smtp.py:577 ('127.0.0.1', 47606) << b'220 skylab Python SMTP 1.4.2'
[ 92s] ------------------------------ Captured log call -------------------------------
[ 92s] DEBUG mail.log:smtp.py:278 _handle_client readline: b'ehlo example.com\r\n'
[ 92s] INFO mail.log:smtp.py:278 ('127.0.0.1', 47606) >> b'ehlo example.com'
[ 92s] DEBUG mail.log:smtp.py:577 ('127.0.0.1', 47606) << b'250-skylab'
[ 92s] DEBUG mail.log:smtp.py:577 ('127.0.0.1', 47606) << b'250-SIZE 33554432'
[ 92s] DEBUG mail.log:smtp.py:577 ('127.0.0.1', 47606) << b'250-SMTPUTF8'
[ 92s] DEBUG mail.log:smtp.py:577 ('127.0.0.1', 47606) << b'250-AUTH DENYFALSE DENYMISSING LOGIN NONE NULL PLAIN WITH-DASH WITH-MULTI-DASH WITH_UNDERSCORE'
[ 92s] DEBUG mail.log:smtp.py:577 ('127.0.0.1', 47606) << b'250 HELP'
[ 92s] DEBUG mail.log:smtp.py:278 _handle_client readline: b'AUTH LOGIN\r\n'
[ 92s] INFO mail.log:smtp.py:278 ('127.0.0.1', 47606) >> b'AUTH LOGIN'
[ 92s] DEBUG mail.log:smtp.py:928 Using builtin auth_ hook for 'LOGIN'
[ 92s] DEBUG mail.log:smtp.py:998 ('127.0.0.1', 47606) << challenge: b'334 VXNlciBOYW1lAA=='
[ 92s] DEBUG mail.log:smtp.py:577 ('127.0.0.1', 47606) << b'334 VXNlciBOYW1lAA=='
[ 92s] DEBUG mail.log:smtp.py:998 ('127.0.0.1', 47606) << challenge: b'334 UGFzc3dvcmQA'
[ 92s] DEBUG mail.log:smtp.py:577 ('127.0.0.1', 47606) << b'334 UGFzc3dvcmQA'
[ 92s] DEBUG mail.log:smtp.py:936 auth_LOGIN returned AuthResult(success=True, handled=True, message=None, auth_data=...)
[ 92s] WARNING mail.log:smtp.py:184 Session.login_data is deprecated and will be removed in version 2.0
[ 92s] DEBUG mail.log:smtp.py:577 ('127.0.0.1', 47606) << b'235 2.7.0 Authentication successful'
[ 92s] ---------------------------- Captured log teardown -----------------------------
[ 92s] DEBUG mail.log:smtp.py:278 _handle_client readline: b'QUIT\r\n'
[ 92s] INFO mail.log:smtp.py:278 ('127.0.0.1', 47606) >> b'QUIT'
[ 92s] DEBUG mail.log:smtp.py:577 ('127.0.0.1', 47606) << b'221 Bye'
[ 92s] INFO mail.log:smtp.py:517 ('127.0.0.1', 47606) connection lost
[ 92s] INFO mail.log:smtp.py:733 ('127.0.0.1', 47606) Connection lost during _handle_client()
```
Python 3.8.9 has the same failure.
A suite run with Python 3.6 reaches the `pytest.xfail` call just after the raises block:
https://github.com/aio-libs/aiosmtpd/blob/1f8404810b59f464c24fa6104566a39fe7e71a0b/aiosmtpd/tests/test_smtp.py#L1053-L1057
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.