Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator_unittest.py

Issue 1413343006: Break the circular dependency in the new mojom bindings generation pipeline. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rename the file that is broken in the index. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 unittest 5 import unittest
6 import module 6 import module
7 7
8 try: 8 try:
9 import mojom_translator 9 import mojom_translator
10 import mojom_files_mojom 10 from generated import mojom_files_mojom
11 import mojom_types_mojom 11 from generated import mojom_types_mojom
12 bindings_imported = True 12 bindings_imported = True
13 except ImportError: 13 except ImportError:
14 bindings_imported = False 14 bindings_imported = False
15 15
16 16
17 @unittest.skipUnless(bindings_imported, 'Could not import python bindings.') 17 @unittest.skipUnless(bindings_imported, 'Could not import python bindings.')
18 class TranslateFileGraph(unittest.TestCase): 18 class TranslateFileGraph(unittest.TestCase):
19 19
20 def test_basics(self): 20 def test_basics(self):
21 g = mojom_files_mojom.MojomFileGraph() 21 g = mojom_files_mojom.MojomFileGraph()
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 result2 = t.KindFromMojom(mojom_type) 686 result2 = t.KindFromMojom(mojom_type)
687 self.assertIs(result, result2) 687 self.assertIs(result, result2)
688 688
689 # Nullable type reference 689 # Nullable type reference
690 mojom_type.type_reference.nullable = True 690 mojom_type.type_reference.nullable = True
691 nullable_result = t.KindFromMojom(mojom_type) 691 nullable_result = t.KindFromMojom(mojom_type)
692 self.assertTrue(module.IsNullableKind(nullable_result)) 692 self.assertTrue(module.IsNullableKind(nullable_result))
693 693
694 if __name__ == '__main__': 694 if __name__ == '__main__':
695 unittest.main() 695 unittest.main()
OLDNEW
« no previous file with comments | « mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py ('k') | mojo/public/tools/bindings/run_code_generators.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698