test: make TestBase inherit unittest.TestCase
We want to extend our base-class to support extensions to unittest.TestCase, so make sure we inherit from it. Adjust all callers to no longer inherit from TestCase, since this is now done automatically by TestBase.
This commit is contained in:
parent
06119f7d88
commit
240905d4a0
5 changed files with 6 additions and 5 deletions
|
|
@ -10,7 +10,7 @@ from osbuild.util import osrelease
|
|||
from .. import test
|
||||
|
||||
|
||||
class TestUtilOSRelease(test.TestBase, unittest.TestCase):
|
||||
class TestUtilOSRelease(test.TestBase):
|
||||
def test_non_existant(self):
|
||||
#
|
||||
# Verify default os-release value, if no files are given.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from .. import test
|
|||
|
||||
|
||||
@unittest.skipUnless(test.TestBase.have_test_checkout(), "no test-checkout access")
|
||||
class TestPylint(test.TestBase, unittest.TestCase):
|
||||
class TestPylint(test.TestBase):
|
||||
def test_pylint(self):
|
||||
#
|
||||
# Run `pylint` on all python sources. We simply use `find` to locate
|
||||
|
|
|
|||
|
|
@ -9,12 +9,13 @@ import os
|
|||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
import osbuild
|
||||
from osbuild.util import linux
|
||||
|
||||
|
||||
class TestBase():
|
||||
class TestBase(unittest.TestCase):
|
||||
"""Base Class for Tests
|
||||
|
||||
This class serves as base for our test infrastructure and provides access
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import unittest
|
|||
from . import test
|
||||
|
||||
|
||||
class TestAssemblers(unittest.TestCase, test.TestBase):
|
||||
class TestAssemblers(test.TestBase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import unittest
|
|||
from . import test
|
||||
|
||||
|
||||
class TestDescriptions(unittest.TestCase, test.TestBase):
|
||||
class TestDescriptions(test.TestBase):
|
||||
|
||||
def assertTreeDiffsEqual(self, tree_diff1, tree_diff2):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue