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 @@ -145,39 +145,53 @@ def test_config_variations(
145
145
assert current_remote .fetch_url == repo_url
146
146
147
147
148
- @pytest .mark .parametrize (
149
- "config_tpl,has_extra_remotes" ,
150
- [
151
- [
152
- """
148
+ class UpdatingRemoteFixture (t .NamedTuple ):
149
+ test_id : str
150
+ config_tpl : str
151
+ has_extra_remotes : bool
152
+
153
+
154
+ UPDATING_REMOTE_FIXTURES = [
155
+ UpdatingRemoteFixture (
156
+ test_id = "one" ,
157
+ config_tpl = """
153
158
{tmp_path}/study/myrepo:
154
159
{CLONE_NAME}: git+file://{dir}
155
160
""" ,
156
- False ,
157
- ],
158
- [
159
- """
161
+ has_extra_remotes = False ,
162
+ ),
163
+ UpdatingRemoteFixture (
164
+ test_id = "second" ,
165
+ config_tpl = """
160
166
{tmp_path}/study/myrepo:
161
167
{CLONE_NAME}:
162
168
repo: git+file://{dir}
163
169
""" ,
164
- False ,
165
- ],
166
- [
167
- """
170
+ has_extra_remotes = False ,
171
+ ),
172
+ UpdatingRemoteFixture (
173
+ test_id = "three" ,
174
+ config_tpl = """
168
175
{tmp_path}/study/myrepo:
169
176
{CLONE_NAME}:
170
177
repo: git+file://{dir}
171
178
remotes:
172
179
mirror_repo: git+file://{dir}
173
180
""" ,
174
- True ,
175
- ],
176
- ],
181
+ has_extra_remotes = True ,
182
+ ),
183
+ ]
184
+
185
+
186
+ @pytest .mark .parametrize (
187
+ list (UpdatingRemoteFixture ._fields ),
188
+ UPDATING_REMOTE_FIXTURES ,
189
+ ids = [test .test_id for test in UPDATING_REMOTE_FIXTURES ],
177
190
)
178
191
def test_updating_remote (
179
192
tmp_path : pathlib .Path ,
180
193
create_git_remote_repo : CreateProjectCallbackFixtureProtocol ,
194
+ test_id : str ,
181
195
config_tpl : str ,
182
196
has_extra_remotes : bool ,
183
197
) -> None :
You can’t perform that action at this time.
0 commit comments