| Index: unittests/errors_test.py
|
| diff --git a/unittests/errors_test.py b/unittests/errors_test.py
|
| index ab8d4a5ebf9fe4d9cb288f93d31e77e9a101c26f..fc9a1f33ed4e8153e4a746018abe1b36d76f278d 100755
|
| --- a/unittests/errors_test.py
|
| +++ b/unittests/errors_test.py
|
| @@ -339,8 +339,23 @@ def RunSteps(api):
|
| self.assertRegexpMatches(
|
| stdout, r'\./foo/bar/recipes\.py run .* do_nothing')
|
|
|
| + def test_invalid_test_names(self):
|
| + # Full tests in recipe_engine/unittests/recipe_test_api_test.py
|
| + with RecipeRepo() as repo:
|
| + repo.make_recipe('test_recipe', """
|
| +DEPS = []
|
| +def RunSteps(api):
|
| + pass
|
|
|
| -
|
| +def GenTests(api):
|
| + yield api.test('best test')
|
| +""")
|
| + subp = subprocess.Popen(
|
| + repo.recipes_cmd + ['simulation_test', 'test_recipe'],
|
| + stdout=subprocess.PIPE)
|
| + stdout, _ = subp.communicate()
|
| + self.assertIn('Traceback', stdout)
|
| + self.assertIn('Invalid test name', stdout)
|
|
|
|
|
| if __name__ == '__main__':
|
|
|