oeqa/selftest: rename git.py to intercept.py

By naming this test class git.py, any attempt to import GitPython (as
needed by oelib.buildhistory) failed.

As this class exercises the intercepts, rename it to intercept.py.

(From OE-Core rev: d557cbbf86767bc2ebf2beb3d70af3b3ca5e0529)

(From OE-Core rev: b4ec76c699f8d20de7d6d2b51b062d8ec41e2486)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2022-08-25 14:37:47 +01:00
committed by Richard Purdie
parent 672187ff65
commit 00e2ab0852
2 changed files with 3 additions and 3 deletions

View File

@@ -3,6 +3,7 @@
# #
import os import os
import sys
from oeqa.selftest.case import OESelftestTestCase from oeqa.selftest.case import OESelftestTestCase
import tempfile import tempfile
import operator import operator
@@ -11,15 +12,14 @@ from oeqa.utils.commands import get_bb_var
class TestBlobParsing(OESelftestTestCase): class TestBlobParsing(OESelftestTestCase):
def setUp(self): def setUp(self):
import time
self.repo_path = tempfile.mkdtemp(prefix='selftest-buildhistory', self.repo_path = tempfile.mkdtemp(prefix='selftest-buildhistory',
dir=get_bb_var('TOPDIR')) dir=get_bb_var('TOPDIR'))
try: try:
from git import Repo from git import Repo
self.repo = Repo.init(self.repo_path) self.repo = Repo.init(self.repo_path)
except ImportError: except ImportError as e:
self.skipTest('Python module GitPython is not present') self.skipTest('Python module GitPython is not present (%s) (%s)' % (e, sys.path))
self.test_file = "test" self.test_file = "test"
self.var_map = {} self.var_map = {}