File tree 1 file changed +30
-16
lines changed
1 file changed +30
-16
lines changed Original file line number Diff line number Diff line change @@ -156,39 +156,53 @@ def test_config_variations(
156
156
assert current_remote .fetch_url == repo_url
157
157
158
158
159
- @pytest .mark .parametrize (
160
- "config_tpl,has_extra_remotes" ,
161
- [
162
- [
163
- """
159
+ class UpdatingRemoteFixture (t .NamedTuple ):
160
+ test_id : str
161
+ config_tpl : str
162
+ has_extra_remotes : bool
163
+
164
+
165
+ UPDATING_REMOTE_FIXTURES = [
166
+ UpdatingRemoteFixture (
167
+ test_id = "one" ,
168
+ config_tpl = """
164
169
{tmp_path}/study/myrepo:
165
170
{CLONE_NAME}: git+file://{dir}
166
171
""" ,
167
- False ,
168
- ],
169
- [
170
- """
172
+ has_extra_remotes = False ,
173
+ ),
174
+ UpdatingRemoteFixture (
175
+ test_id = "second" ,
176
+ config_tpl = """
171
177
{tmp_path}/study/myrepo:
172
178
{CLONE_NAME}:
173
179
repo: git+file://{dir}
174
180
""" ,
175
- False ,
176
- ],
177
- [
178
- """
181
+ has_extra_remotes = False ,
182
+ ),
183
+ UpdatingRemoteFixture (
184
+ test_id = "three" ,
185
+ config_tpl = """
179
186
{tmp_path}/study/myrepo:
180
187
{CLONE_NAME}:
181
188
repo: git+file://{dir}
182
189
remotes:
183
190
mirror_repo: git+file://{dir}
184
191
""" ,
185
- True ,
186
- ],
187
- ],
192
+ has_extra_remotes = True ,
193
+ ),
194
+ ]
195
+
196
+
197
+ @pytest .mark .parametrize (
198
+ list (UpdatingRemoteFixture ._fields ),
199
+ UPDATING_REMOTE_FIXTURES ,
200
+ ids = [test .test_id for test in UPDATING_REMOTE_FIXTURES ],
188
201
)
189
202
def test_updating_remote (
190
203
tmp_path : pathlib .Path ,
191
204
create_git_remote_repo : CreateProjectCallbackFixtureProtocol ,
205
+ test_id : str ,
192
206
config_tpl : str ,
193
207
has_extra_remotes : bool ,
194
208
) -> None :
You can’t perform that action at this time.
0 commit comments