Skip to content

Commit c561e6b

Browse files
committed
Rewrite exclude tests without YAML
Signed-off-by: John Pennycook <john.pennycook@intel.com>
1 parent 8fc1e04 commit c561e6b

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

tests/exclude/exclude.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/exclude/test_exclude.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# SPDX-License-Identifier: BSD-3-Clause
33

44
import logging
5+
import os
56
import unittest
67

78
from codebasin import config, finder
@@ -18,11 +19,15 @@ def setUp(self):
1819
logging.getLogger("codebasin").disabled = True
1920

2021
def _get_setmap(self, excludes):
21-
codebase, configuration = config.load(
22-
"./tests/exclude/exclude.yaml",
23-
self.rootdir,
24-
exclude_patterns=excludes,
25-
)
22+
codebase = {
23+
"files": [],
24+
"platforms": ["test"],
25+
"exclude_files": set(),
26+
"exclude_patterns": excludes,
27+
"rootdir": os.path.realpath(self.rootdir),
28+
}
29+
dbpath = os.path.realpath(os.path.join(self.rootdir, "commands.json"))
30+
configuration = {"test": config.load_database(dbpath, self.rootdir)}
2631
state = finder.find(self.rootdir, codebase, configuration)
2732
mapper = PlatformMapper(codebase)
2833
setmap = mapper.walk(state)

0 commit comments

Comments
 (0)