File tree 1 file changed +10
-15
lines changed
pep_sphinx_extensions/tests/pep_zero_generator
1 file changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -28,26 +28,21 @@ def test_pep_equal():
28
28
assert pep_a == pep_b
29
29
30
30
31
- def test_pep_details ():
32
- pep8 = parser .PEP (Path ("pep-0008.txt" ), AUTHORS_OVERRIDES )
33
-
34
- assert pep8 .details (title_length = 80 ) == {
35
- "authors" : "GvR, Warsaw, Coghlan" ,
36
- "number" : 8 ,
37
- "status" : " " ,
38
- "title" : "Style Guide for Python Code" ,
39
- "type" : "P" ,
40
- }
41
-
42
-
43
- def test_pep_details_short_title ():
31
+ @pytest .mark .parametrize (
32
+ "test_input, expected" ,
33
+ [
34
+ (80 , "Style Guide for Python Code" ),
35
+ (10 , "Style ..." ),
36
+ ],
37
+ )
38
+ def test_pep_details (test_input , expected ):
44
39
pep8 = parser .PEP (Path ("pep-0008.txt" ), AUTHORS_OVERRIDES )
45
40
46
- assert pep8 .details (title_length = 10 ) == {
41
+ assert pep8 .details (title_length = test_input ) == {
47
42
"authors" : "GvR, Warsaw, Coghlan" ,
48
43
"number" : 8 ,
49
44
"status" : " " ,
50
- "title" : "Style ..." ,
45
+ "title" : expected ,
51
46
"type" : "P" ,
52
47
}
53
48
You can’t perform that action at this time.
0 commit comments