@@ -69,19 +69,19 @@ def test_invalid_issue_number(issue):
69
69
70
70
class TestValidSectionNames :
71
71
@staticmethod
72
- def check (section , expect ):
72
+ def check (section , expected ):
73
73
actual = blurb ._extract_section_name (section )
74
- assert actual == expect
74
+ assert actual == expected
75
75
76
76
@pytest .mark .parametrize (
77
- ('section' , 'expect ' ),
77
+ ('section' , 'expected ' ),
78
78
tuple (zip (blurb .SECTIONS , blurb .SECTIONS ))
79
79
)
80
- def test_exact_names (self , section , expect ):
81
- self .check (section , expect )
80
+ def test_exact_names (self , section , expected ):
81
+ self .check (section , expected )
82
82
83
83
@pytest .mark .parametrize (
84
- ('section' , 'expect ' ), [
84
+ ('section' , 'expected ' ), [
85
85
('Sec' , 'Security' ),
86
86
('sec' , 'Security' ),
87
87
('security' , 'Security' ),
@@ -103,11 +103,11 @@ def test_exact_names(self, section, expect):
103
103
('core' , 'Core and Builtins' ),
104
104
]
105
105
)
106
- def test_partial_words (self , section , expect ):
107
- self .check (section , expect )
106
+ def test_partial_words (self , section , expected ):
107
+ self .check (section , expected )
108
108
109
109
@pytest .mark .parametrize (
110
- ('section' , 'expect ' ), [
110
+ ('section' , 'expected ' ), [
111
111
('builtin' , 'Core and Builtins' ),
112
112
('builtins' , 'Core and Builtins' ),
113
113
('api' , 'C API' ),
@@ -119,11 +119,11 @@ def test_partial_words(self, section, expect):
119
119
('demos' , 'Tools/Demos' ),
120
120
]
121
121
)
122
- def test_partial_special_names (self , section , expect ):
123
- self .check (section , expect )
122
+ def test_partial_special_names (self , section , expected ):
123
+ self .check (section , expected )
124
124
125
125
@pytest .mark .parametrize (
126
- ('section' , 'expect ' ), [
126
+ ('section' , 'expected ' ), [
127
127
('Core-and-Builtins' , 'Core and Builtins' ),
128
128
('Core_and_Builtins' , 'Core and Builtins' ),
129
129
('Core_and-Builtins' , 'Core and Builtins' ),
@@ -138,12 +138,12 @@ def test_partial_special_names(self, section, expect):
138
138
('Tools demo' , 'Tools/Demos' ),
139
139
]
140
140
)
141
- def test_partial_separators (self , section , expect ):
141
+ def test_partial_separators (self , section , expected ):
142
142
# normalize the separtors '_', '-', ' ' and '/'
143
- self .check (section , expect )
143
+ self .check (section , expected )
144
144
145
145
@pytest .mark .parametrize (
146
- ('prefix' , 'expect ' ), [
146
+ ('prefix' , 'expected ' ), [
147
147
('corean' , 'Core and Builtins' ),
148
148
('coreand' , 'Core and Builtins' ),
149
149
('coreandbuilt' , 'Core and Builtins' ),
@@ -157,23 +157,23 @@ def test_partial_separators(self, section, expect):
157
157
('Coreand buil' , 'Core and Builtins' ),
158
158
]
159
159
)
160
- def test_partial_prefix_words (self , prefix , expect ):
160
+ def test_partial_prefix_words (self , prefix , expected ):
161
161
# try to find a match using prefixes (without separators and lowercase)
162
- self .check (prefix , expect )
162
+ self .check (prefix , expected )
163
163
164
164
@pytest .mark .parametrize (
165
- ('section' , 'expect ' ),
165
+ ('section' , 'expected ' ),
166
166
[(name .lower (), name ) for name in blurb .SECTIONS ],
167
167
)
168
- def test_exact_names_lowercase (self , section , expect ):
169
- self .check (section , expect )
168
+ def test_exact_names_lowercase (self , section , expected ):
169
+ self .check (section , expected )
170
170
171
171
@pytest .mark .parametrize (
172
- ('section' , 'expect ' ),
172
+ ('section' , 'expected ' ),
173
173
[(name .upper (), name ) for name in blurb .SECTIONS ],
174
174
)
175
- def test_exact_names_uppercase (self , section , expect ):
176
- self .check (section , expect )
175
+ def test_exact_names_uppercase (self , section , expected ):
176
+ self .check (section , expected )
177
177
178
178
179
179
@pytest .mark .parametrize ('section' , ['' , ' ' , ' ' ])
0 commit comments