diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2017-06-08 11:32:06 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-12 15:04:09 +0100 |
commit | 4d01610f36eaee8da3126bb5045856279371fd17 (patch) | |
tree | 2155e594c7b5059ffb49c441e5a4ec7c0dfb8ae1 /meta/lib/oeqa | |
parent | cf2ee12b007e5570959ccfbb643159b21d90426e (diff) | |
download | openembedded-core-4d01610f36eaee8da3126bb5045856279371fd17.tar.gz openembedded-core-4d01610f36eaee8da3126bb5045856279371fd17.tar.bz2 openembedded-core-4d01610f36eaee8da3126bb5045856279371fd17.zip |
oeqa/cases/oelib: Change default case class to unittest.case.TestCase
Some tests doesn't need call bitbake so it is better to use the
basic unittest case class.
[YOCTO #10828]
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/oelib/elf.py | 4 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/oelib/license.py | 6 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/oelib/path.py | 4 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/oelib/types.py | 6 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/oelib/utils.py | 6 |
5 files changed, 13 insertions, 13 deletions
diff --git a/meta/lib/oeqa/selftest/cases/oelib/elf.py b/meta/lib/oeqa/selftest/cases/oelib/elf.py index 0451ebaffb..74ee6a11cc 100644 --- a/meta/lib/oeqa/selftest/cases/oelib/elf.py +++ b/meta/lib/oeqa/selftest/cases/oelib/elf.py @@ -1,7 +1,7 @@ -from oeqa.selftest.case import OESelftestTestCase +from unittest.case import TestCase import oe.qa -class TestElf(OESelftestTestCase): +class TestElf(TestCase): def test_machine_name(self): """ Test elf_machine_to_string() diff --git a/meta/lib/oeqa/selftest/cases/oelib/license.py b/meta/lib/oeqa/selftest/cases/oelib/license.py index a6d9c9ac7a..bfd9ed9c29 100644 --- a/meta/lib/oeqa/selftest/cases/oelib/license.py +++ b/meta/lib/oeqa/selftest/cases/oelib/license.py @@ -1,4 +1,4 @@ -from oeqa.selftest.case import OESelftestTestCase +from unittest.case import TestCase import oe.license class SeenVisitor(oe.license.LicenseVisitor): @@ -9,7 +9,7 @@ class SeenVisitor(oe.license.LicenseVisitor): def visit_Str(self, node): self.seen.append(node.s) -class TestSingleLicense(OESelftestTestCase): +class TestSingleLicense(TestCase): licenses = [ "GPLv2", "LGPL-2.0", @@ -37,7 +37,7 @@ class TestSingleLicense(OESelftestTestCase): self.parse(license) self.assertEqual(cm.exception.license, license) -class TestSimpleCombinations(OESelftestTestCase): +class TestSimpleCombinations(TestCase): tests = { "FOO&BAR": ["FOO", "BAR"], "BAZ & MOO": ["BAZ", "MOO"], diff --git a/meta/lib/oeqa/selftest/cases/oelib/path.py b/meta/lib/oeqa/selftest/cases/oelib/path.py index 2ae5eaf89e..75a27c06f7 100644 --- a/meta/lib/oeqa/selftest/cases/oelib/path.py +++ b/meta/lib/oeqa/selftest/cases/oelib/path.py @@ -1,11 +1,11 @@ -from oeqa.selftest.case import OESelftestTestCase +from unittest.case import TestCase import oe, oe.path import tempfile import os import errno import shutil -class TestRealPath(OESelftestTestCase): +class TestRealPath(TestCase): DIRS = [ "a", "b", "etc", "sbin", "usr", "usr/bin", "usr/binX", "usr/sbin", "usr/include", "usr/include/gdbm" ] FILES = [ "etc/passwd", "b/file" ] LINKS = [ diff --git a/meta/lib/oeqa/selftest/cases/oelib/types.py b/meta/lib/oeqa/selftest/cases/oelib/types.py index 99c84044be..6b53aa64e5 100644 --- a/meta/lib/oeqa/selftest/cases/oelib/types.py +++ b/meta/lib/oeqa/selftest/cases/oelib/types.py @@ -1,7 +1,7 @@ -from oeqa.selftest.case import OESelftestTestCase +from unittest.case import TestCase from oe.maketype import create -class TestBooleanType(OESelftestTestCase): +class TestBooleanType(TestCase): def test_invalid(self): self.assertRaises(ValueError, create, '', 'boolean') self.assertRaises(ValueError, create, 'foo', 'boolean') @@ -31,7 +31,7 @@ class TestBooleanType(OESelftestTestCase): self.assertEqual(create('y', 'boolean'), True) self.assertNotEqual(create('y', 'boolean'), False) -class TestList(OESelftestTestCase): +class TestList(TestCase): def assertListEqual(self, value, valid, sep=None): obj = create(value, 'list', separator=sep) self.assertEqual(obj, valid) diff --git a/meta/lib/oeqa/selftest/cases/oelib/utils.py b/meta/lib/oeqa/selftest/cases/oelib/utils.py index 5bc5fffae7..9fb6c1576e 100644 --- a/meta/lib/oeqa/selftest/cases/oelib/utils.py +++ b/meta/lib/oeqa/selftest/cases/oelib/utils.py @@ -1,7 +1,7 @@ -from oeqa.selftest.case import OESelftestTestCase +from unittest.case import TestCase from oe.utils import packages_filter_out_system, trim_version -class TestPackagesFilterOutSystem(OESelftestTestCase): +class TestPackagesFilterOutSystem(TestCase): def test_filter(self): """ Test that oe.utils.packages_filter_out_system works. @@ -31,7 +31,7 @@ class TestPackagesFilterOutSystem(OESelftestTestCase): self.assertEqual(pkgs, ["foo-data"]) -class TestTrimVersion(OESelftestTestCase): +class TestTrimVersion(TestCase): def test_version_exception(self): with self.assertRaises(TypeError): trim_version(None, 2) |