From ace63f4ea55643cb99aaa444d216a6bb9ebb1ed3 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 12 Aug 2015 12:25:30 +0200 Subject: Replace uses of map() In Python 2, map() returns a list; in Python 3 it returns an iterator. Replace all uses by list comprehensions, generators, or for loops, as required. Reviewed-By: Christian Heimes Reviewed-By: Jan Cholasta --- ipatests/test_ipalib/test_errors.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ipatests/test_ipalib/test_errors.py') diff --git a/ipatests/test_ipalib/test_errors.py b/ipatests/test_ipalib/test_errors.py index 938b9fcec..dfe60f283 100644 --- a/ipatests/test_ipalib/test_errors.py +++ b/ipatests/test_ipalib/test_errors.py @@ -329,8 +329,7 @@ class test_PublicError(PublicExceptionTester): # this expression checks if each word of instructions # exists in a string as a separate line, with right order regexp = re.compile('(?ims).*' + - ''.join(map(lambda x: '(%s).*' % (x), - instructions)) + + ''.join('(%s).*' % (x) for x in instructions) + '$') inst = subclass(instructions=instructions, **kw) assert inst.format is subclass.format -- cgit