| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 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 unittest | 6 import unittest |
| 7 import os | 7 import os |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 from mopy.mojo_python_tests_runner import MojoPythonTestRunner | 10 from mopy.mojo_python_tests_runner import MojoPythonTestRunner |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 def get_test_suite(self, loader, pylib_dir): | 25 def get_test_suite(self, loader, pylib_dir): |
| 26 if pylib_dir not in sys.path: | 26 if pylib_dir not in sys.path: |
| 27 sys.path.append(pylib_dir) | 27 sys.path.append(pylib_dir) |
| 28 suite = unittest.TestSuite() | 28 suite = unittest.TestSuite() |
| 29 suite.addTests(loader.loadTestsFromName(self._test_module)) | 29 suite.addTests(loader.loadTestsFromName(self._test_module)) |
| 30 return suite | 30 return suite |
| 31 | 31 |
| 32 | 32 |
| 33 | 33 |
| 34 def main(): | 34 def main(): |
| 35 test_dir = os.path.join('mojo', 'public', 'tools', 'bindings', 'pylib') | 35 test_dir = os.path.join( |
| 36 test_module = 'mojom.generate.mojom_translator_unittest' | 36 'mojo', 'public', 'tools', 'bindings', 'pylib', 'mojom', 'generate') |
| 37 test_module = 'mojom_translator_unittest' |
| 37 runner = PythonMojomTestRunner(test_dir, test_module=test_module) | 38 runner = PythonMojomTestRunner(test_dir, test_module=test_module) |
| 38 sys.exit(runner.run()) | 39 sys.exit(runner.run()) |
| 39 | 40 |
| 40 if __name__ == '__main__': | 41 if __name__ == '__main__': |
| 41 sys.exit(main()) | 42 sys.exit(main()) |
| OLD | NEW |