| OLD | NEW |
| 1 #!/usr/local/google/home/pgervais/prog/new_infra/infra/ENV/bin/python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import argparse | 6 import argparse |
| 7 import os | 7 import os |
| 8 | 8 |
| 9 import argcomplete | 9 import argcomplete |
| 10 | 10 |
| 11 import expect_tests | 11 import expect_tests |
| 12 | 12 |
| 13 if os.getenv('_ARGCOMPLETE') == '1': | 13 if os.getenv('_ARGCOMPLETE') == '1': |
| 14 orig_parse_args = argparse.ArgumentParser.parse_args | 14 orig_parse_args = argparse.ArgumentParser.parse_args |
| 15 def new_parse_args(self, *args, **kwargs): | 15 def new_parse_args(self, *args, **kwargs): |
| 16 argcomplete.autocomplete(self) | 16 argcomplete.autocomplete(self) |
| 17 return orig_parse_args(*args, **kwargs) | 17 return orig_parse_args(*args, **kwargs) |
| 18 argparse.ArgumentParser.parse_args = new_parse_args | 18 argparse.ArgumentParser.parse_args = new_parse_args |
| 19 | 19 |
| 20 expect_tests.main(cover_branches=True) | 20 expect_tests.main(cover_branches=True) |
| OLD | NEW |