mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-07-03 20:41:29 +00:00
test: Fix typo
Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
bc0a5f6e2b
commit
0c1147e4e1
@ -5,7 +5,7 @@ from britney2.hints import HintParser, single_hint_taking_list_of_packages
|
|||||||
from . import MockObject, HINTS_ALL, TEST_HINTER
|
from . import MockObject, HINTS_ALL, TEST_HINTER
|
||||||
|
|
||||||
|
|
||||||
def new_hint_paser(logger=None):
|
def new_hint_parser(logger=None):
|
||||||
if logger is None:
|
if logger is None:
|
||||||
def empty_logger(x, type='I'):
|
def empty_logger(x, type='I'):
|
||||||
pass
|
pass
|
||||||
@ -23,7 +23,7 @@ class HintParsing(unittest.TestCase):
|
|||||||
|
|
||||||
def test_parse_invalid_hints(self):
|
def test_parse_invalid_hints(self):
|
||||||
hint_log = []
|
hint_log = []
|
||||||
hint_parser = new_hint_paser(lambda x, type='I': hint_log.append(x))
|
hint_parser = new_hint_parser(lambda x, type='I': hint_log.append(x))
|
||||||
|
|
||||||
hint_parser.register_hint_type('min-10-arg', parse_should_not_call_this_function, min_args=10)
|
hint_parser.register_hint_type('min-10-arg', parse_should_not_call_this_function, min_args=10)
|
||||||
hint_parser.register_hint_type('simple-hint', parse_should_not_call_this_function)
|
hint_parser.register_hint_type('simple-hint', parse_should_not_call_this_function)
|
||||||
@ -54,7 +54,7 @@ class HintParsing(unittest.TestCase):
|
|||||||
hint_log.clear()
|
hint_log.clear()
|
||||||
|
|
||||||
def test_alias(self):
|
def test_alias(self):
|
||||||
hint_parser = new_hint_paser()
|
hint_parser = new_hint_parser()
|
||||||
hint_parser.register_hint_type('real-name',
|
hint_parser.register_hint_type('real-name',
|
||||||
single_hint_taking_list_of_packages,
|
single_hint_taking_list_of_packages,
|
||||||
aliases=['alias1', 'alias2']
|
aliases=['alias1', 'alias2']
|
||||||
@ -74,5 +74,6 @@ class HintParsing(unittest.TestCase):
|
|||||||
assert not hints.search(type='alias1', package='foo', version='1.0')
|
assert not hints.search(type='alias1', package='foo', version='1.0')
|
||||||
assert not hints.search(type='alias2', package='bar', version='2.0')
|
assert not hints.search(type='alias2', package='bar', version='2.0')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user