Fix test.
This commit is contained in:
parent
e1b8a90747
commit
a5f9bc3da6
1 changed files with 10 additions and 3 deletions
|
@ -45,10 +45,17 @@ class DummyAptSearcher(FileSearcher):
|
||||||
def __init__(self, files):
|
def __init__(self, files):
|
||||||
self._apt_files = files
|
self._apt_files = files
|
||||||
|
|
||||||
def search_files(self, path, regex=False):
|
def search_files(self, path, regex=False, case_insensitive=False):
|
||||||
for p, pkg in sorted(self._apt_files.items()):
|
for p, pkg in sorted(self._apt_files.items()):
|
||||||
|
if case_insensitive:
|
||||||
|
flags = re.I
|
||||||
|
else:
|
||||||
|
flags = 0
|
||||||
if regex:
|
if regex:
|
||||||
if re.match(path, p):
|
if re.match(path, p, flags):
|
||||||
|
yield pkg
|
||||||
|
elif case_insensitive:
|
||||||
|
if path.lower() == p.lower():
|
||||||
yield pkg
|
yield pkg
|
||||||
else:
|
else:
|
||||||
if path == p:
|
if path == p:
|
||||||
|
@ -105,7 +112,7 @@ blah (0.1) UNRELEASED; urgency=medium
|
||||||
update_changelog=True,
|
update_changelog=True,
|
||||||
commit_reporter=NullCommitReporter(),
|
commit_reporter=NullCommitReporter(),
|
||||||
)
|
)
|
||||||
fixers = versioned_package_fixers(session, context) + apt_fixers(apt, context)
|
fixers = versioned_package_fixers(session, context, apt) + apt_fixers(apt, context)
|
||||||
return resolve_error(error, ("build",), fixers)
|
return resolve_error(error, ("build",), fixers)
|
||||||
|
|
||||||
def get_build_deps(self):
|
def get_build_deps(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue