Skip to content

Commit 2fa4b9d

Browse files
committed
Make only the final test classes derive from ScriptsRepoMixin
This allows for more mixing of the mixins...
1 parent 5c05ceb commit 2fa4b9d

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

tests/mixin_scripts_repo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def write_style(self, style_dict):
9797
self.repo.write_file('.clang-format', content)
9898

9999

100-
class CloneRepoMixin(ScriptsRepoMixin):
100+
class CloneRepoMixin():
101101
'''
102102
A mixin representing a git repository cloned from this git repository.
103103
'''
@@ -110,7 +110,7 @@ def clone_this_repo(self):
110110
return self.clone_repo(self.this_repo_path())
111111

112112

113-
class SubmoduleMixin(ScriptsRepoMixin):
113+
class SubmoduleMixin():
114114
'''
115115
A mixin representing a git repository in which this git repository is added as a submodule.
116116
'''
@@ -128,7 +128,7 @@ def new_repo_with_submodule(self):
128128
return repo
129129

130130

131-
class CopiedFilesMixin(ScriptsRepoMixin):
131+
class CopiedFilesMixin():
132132
'''
133133
A mixin representing a git repository in which the scripts from this git repository are
134134
directly copied.

tests/test_apply_format.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
)
1616

1717

18-
class FormatTestCaseBase(ScriptsRepoMixin):
18+
class FormatTestCaseBase():
1919
'''
2020
Test the apply-format script.
2121
'''
@@ -275,18 +275,21 @@ def test_whole_file(self):
275275

276276

277277
class FormatClonedTestCase(CloneRepoMixin,
278+
ScriptsRepoMixin,
278279
FormatTestCaseBase,
279280
unittest.TestCase):
280281
pass
281282

282283

283284
class FormatSubmoduleTestCase(SubmoduleMixin,
285+
ScriptsRepoMixin,
284286
FormatTestCaseBase,
285287
unittest.TestCase):
286288
pass
287289

288290

289291
class FormatCopiedScriptsTestCase(CopiedFilesMixin,
292+
ScriptsRepoMixin,
290293
FormatTestCaseBase,
291294
unittest.TestCase):
292295
pass

tests/test_hook.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
CopiedFilesMixin,
1919
)
2020

21-
class HookTestCaseBase(ScriptsRepoMixin):
21+
22+
class HookTestCaseBase():
2223
'''
2324
Test the git hook script.
2425
'''
@@ -206,18 +207,21 @@ def test_install_from_scripts_dir(self):
206207

207208

208209
class HookClonedTestCase(CloneRepoMixin,
210+
ScriptsRepoMixin,
209211
HookTestCaseBase,
210212
unittest.TestCase):
211213
pass
212214

213215

214216
class HookSubmoduleTestCase(SubmoduleMixin,
217+
ScriptsRepoMixin,
215218
HookTestCaseBase,
216219
unittest.TestCase):
217220
pass
218221

219222

220223
class HookCopiedScriptsTestCase(CopiedFilesMixin,
224+
ScriptsRepoMixin,
221225
HookTestCaseBase,
222226
unittest.TestCase):
223227
pass

0 commit comments

Comments
 (0)