mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-10 22:17:36 +00:00
inst_tester: add is_pkg_in_testing
This commit is contained in:
parent
20a64cadef
commit
713b98ad6b
@ -162,6 +162,14 @@ class InstallabilityTester(object):
|
||||
"""
|
||||
return not self._testing.isdisjoint(pkgs)
|
||||
|
||||
def is_pkg_in_testing(self, pkg):
|
||||
"""Test if the package of is in testing
|
||||
|
||||
:param pkgs: A package id (as defined in the constructor)
|
||||
:return: True if the pkg is currently in testing
|
||||
"""
|
||||
return pkg in self._testing
|
||||
|
||||
def add_testing_binary(self, pkg_id):
|
||||
"""Add a binary package to "testing"
|
||||
|
||||
|
@ -31,6 +31,8 @@ class TestInstTester(unittest.TestCase):
|
||||
universe.remove_testing_binary(pkg_perl)
|
||||
assert not universe.any_of_these_are_in_testing((pkg_perl,))
|
||||
assert universe.any_of_these_are_in_testing((pkg_lintian,))
|
||||
assert not universe.is_pkg_in_testing(pkg_perl)
|
||||
assert universe.is_pkg_in_testing(pkg_lintian)
|
||||
assert not universe.is_installable(pkg_lintian)
|
||||
assert not universe.is_installable(pkg_perl)
|
||||
universe.add_testing_binary(pkg_perl)
|
||||
|
Loading…
x
Reference in New Issue
Block a user