| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import itertools | 5 import itertools |
| 6 import sys | 6 import sys |
| 7 import unittest | 7 import unittest |
| 8 | 8 |
| 9 import mopy.gn as gn | 9 import mopy.gn as gn |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 | 60 |
| 61 def _iterate_over_config(config): | 61 def _iterate_over_config(config): |
| 62 def product_to_dict(p): | 62 def product_to_dict(p): |
| 63 return dict(filter(lambda x: x[1] is not None, zip(config.keys(), p))) | 63 return dict(filter(lambda x: x[1] is not None, zip(config.keys(), p))) |
| 64 return itertools.imap(product_to_dict, itertools.product(*config.values())) | 64 return itertools.imap(product_to_dict, itertools.product(*config.values())) |
| 65 | 65 |
| 66 | 66 |
| 67 if __name__ == "__main__": | 67 if __name__ == "__main__": |
| 68 unittest.main() | 68 unittest.main() |
| OLD | NEW |