Skip to content

Commit f051563

Browse files
cdelerpgjones
authored andcommitted
Small rfg for tests
- added pytest param names to test_receivebuffer_for_invalid_delimiter
1 parent bdcc34e commit f051563

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed

h11/tests/test_receivebuffer.py

+30-7
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,37 @@ def test_receivebuffer():
8585
@pytest.mark.parametrize(
8686
"data",
8787
[
88-
(
89-
b"HTTP/1.1 200 OK\r\n",
90-
b"Content-type: text/plain\r\n",
91-
b"\r\n",
92-
b"Some body",
88+
pytest.param(
89+
(
90+
b"HTTP/1.1 200 OK\r\n",
91+
b"Content-type: text/plain\r\n",
92+
b"\r\n",
93+
b"Some body",
94+
),
95+
id="with_crlf_delimiter",
96+
),
97+
pytest.param(
98+
(b"HTTP/1.1 200 OK\n", b"Content-type: text/plain\n", b"\n", b"Some body"),
99+
id="with_lf_only_delimiter",
100+
),
101+
pytest.param(
102+
(
103+
b"HTTP/1.1 200 OK\r\n",
104+
b"Content-type: text/plain\n",
105+
b"\n",
106+
b"Some body",
107+
),
108+
id="with_double_lf_before_body",
109+
),
110+
pytest.param(
111+
(
112+
b"HTTP/1.1 200 OK\r\n",
113+
b"Content-type: text/plain\r\n",
114+
b"\n",
115+
b"Some body",
116+
),
117+
id="with_mixed_crlf",
93118
),
94-
(b"HTTP/1.1 200 OK\n", b"Content-type: text/plain\n", b"\n", b"Some body"),
95-
(b"HTTP/1.1 200 OK\r\n", b"Content-type: text/plain\n", b"\n", b"Some body"),
96119
],
97120
)
98121
def test_receivebuffer_for_invalid_delimiter(data):

0 commit comments

Comments
 (0)