mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
AbstractBaseTest class for sharing setUp and tearDown in tests
This commit is contained in:
parent
f269232b96
commit
36007d50e5
2 changed files with 13 additions and 5 deletions
|
|
@ -19,8 +19,8 @@ from fdroidserver._yaml import config_dump
|
|||
basedir = Path(__file__).parent
|
||||
|
||||
|
||||
class LintTest(unittest.TestCase):
|
||||
'''fdroidserver/lint.py'''
|
||||
class SetUpTearDownMixin:
|
||||
"""A base class with no test in it for shared setUp and tearDown."""
|
||||
|
||||
def setUp(self):
|
||||
os.chdir(basedir)
|
||||
|
|
@ -33,6 +33,10 @@ class LintTest(unittest.TestCase):
|
|||
def tearDown(self):
|
||||
self._td.cleanup()
|
||||
|
||||
|
||||
class LintTest(SetUpTearDownMixin, unittest.TestCase):
|
||||
'''fdroidserver/lint.py'''
|
||||
|
||||
def test_check_for_unsupported_metadata_files(self):
|
||||
self.assertTrue(fdroidserver.lint.check_for_unsupported_metadata_files())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue