| Index: tests/trychange_unittest.py
|
| diff --git a/tests/trychange_unittest.py b/tests/trychange_unittest.py
|
| index ebcf14b137b272dd80dcbb099b66578f956d88e8..d749f164d1d5b97c4c90a612291879ceab9f01c7 100755
|
| --- a/tests/trychange_unittest.py
|
| +++ b/tests/trychange_unittest.py
|
| @@ -51,8 +51,8 @@ class TryChangeUnittest(TryChangeTestsBase):
|
| 'PrintSuccess',
|
| 'RunCommand', 'RunGit', 'SCM', 'SVN', 'TryChange', 'USAGE', 'breakpad',
|
| 'datetime', 'errno', 'fix_encoding', 'gcl', 'gclient_utils', 'gen_parser',
|
| - 'getpass', 'json', 'logging', 'optparse', 'os', 'posixpath', 're', 'scm',
|
| - 'shutil', 'subprocess2', 'sys', 'tempfile', 'urllib']
|
| + 'getpass', 'itertools', 'json', 'logging', 'optparse', 'os', 'posixpath',
|
| + 're', 'scm', 'shutil', 'subprocess2', 'sys', 'tempfile', 'urllib']
|
| # If this test fails, you should add the relevant test.
|
| self.compareMembers(trychange, members)
|
|
|
| @@ -70,7 +70,10 @@ class TryChangeSimpleTest(unittest.TestCase):
|
| options, args = trychange.gen_parser(None).parse_args(cmd)
|
| self.assertEquals([], args)
|
| # pylint: disable=W0212
|
| - values = trychange._ParseSendChangeOptions(options)
|
| + bot_spec = trychange._ParseBotList(options.bot, options.testfilter)
|
| + if options.testfilter:
|
| + bot_spec = trychange._ApplyTestFilter(options.testfilter, bot_spec)
|
| + values = trychange._ParseSendChangeOptions(bot_spec, options)
|
| self.assertEquals(
|
| [
|
| ('user', 'joe'),
|
| @@ -90,8 +93,9 @@ class TryChangeSimpleTest(unittest.TestCase):
|
| self.assertEquals([], args)
|
| try:
|
| # pylint: disable=W0212
|
| - trychange._ParseSendChangeOptions(options)
|
| - self.fail()
|
| + bot_spec = trychange._ParseBotList(options.bot, options.testfilter)
|
| + if options.testfilter:
|
| + trychange._ApplyTestFilter(options.testfilter, bot_spec)
|
| except ValueError:
|
| pass
|
|
|
|
|