`test_ssl` is too verbose
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Bắt đầu trong Lib/test/test_ssl.py, đặc biệt là các luồng tương tác giữa server và client được nêu trong issue, và kiểm tra cách test.test_ssl hiện báo cáo traceback và hội thoại. Chạy các trường hợp test.test_ssl liên quan để xác định đầu ra gây nhiễu; được xem là hoàn tất khi các lỗi server bị bỏ qua đến được main thread để thực hiện assertions và các trao đổi giữa client-server không còn in tiến trình nữa, nhưng PR được liên kết cần được kiểm tra trước.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Feature or enhancement
-
turn loud but ignored server tracebacks into silent exceptions passed straight to a main thread for
assertRaiseschecks. An example of how it's currently (note "ok" in the last line):test_connect_ex (test.test_ssl.SimpleBackgroundTests.test_connect_ex) ... server: new connection from ('127.0.0.1', 51236) server: bad connection attempt from ('127.0.0.1', 51236): Traceback (most recent call last): File "D:\a\cpython\cpython\Lib\test\test_ssl.py", line 2371, in wrap_conn self.sslconn = self.server.context.wrap_socket( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\a\cpython\cpython\Lib\ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\a\cpython\cpython\Lib\ssl.py", line 1013, in _create self.do_handshake() ^^^^^^^^^^^^^^^^^^^ File "D:\a\cpython\cpython\Lib\ssl.py", line 1284, in do_handshake self._sslobj.do_handshake() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine ok -
stop printing a dialog between a client and a server; use the same assertion mechanism instead. An example:
test_alpn_protocols (test.test_ssl.ThreadedTests.test_alpn_protocols) ... server: new connection from ('127.0.0.1', 51305) client: sending b'FOO\n'... server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256) client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. server: new connection from ('127.0.0.1', 51307) client: sending b'FOO\n'... server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256) client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. server: new connection from ('127.0.0.1', 51309) client: sending b'FOO\n'... server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256) client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. server: new connection from ('127.0.0.1', 51311) client: sending b'FOO\n'... server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256) client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. ok
Pitch
While (almost) all tests keep silence, test_ssl reports every nit into a console making the log bloated (>1200 lines) to the degree of being unusable for failure tracking.
In addition, all these reports must be looked through manually. Assertions should be used instead.
Linked PRs
- gh-92475
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 36k
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 558
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của python/cpython
-
docs pending
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
stdlib type-feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
stdlib type-feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
build type-bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
stdlib topic-email type-feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Tất cả issue của python/cpython
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
zostera/django-bootstrap4#894 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
use-agent-os/agent-os#3276 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
NousResearch/hermes-agent#117848 ·