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 math | 5 import math |
6 import unittest | 6 import unittest |
7 | 7 |
8 # pylint: disable=F0401 | |
9 import mojo.bindings.reflection as reflection | 8 import mojo.bindings.reflection as reflection |
| 9 |
| 10 # pylint: disable=E0611,F0401 |
10 import mojo.system | 11 import mojo.system |
11 | 12 |
12 # Generated files | 13 # Generated files |
13 # pylint: disable=F0401 | 14 # pylint: disable=F0401 |
14 import sample_import_mojom | 15 import sample_import_mojom |
15 import sample_import2_mojom | 16 import sample_import2_mojom |
16 import sample_service_mojom | 17 import sample_service_mojom |
17 | 18 |
18 | 19 |
19 def _NewHandle(): | 20 def _NewHandle(): |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 v1.a21 = sample_import_mojom.Point() | 122 v1.a21 = sample_import_mojom.Point() |
122 v1.a22.location = sample_import_mojom.Point() | 123 v1.a22.location = sample_import_mojom.Point() |
123 v1.a22.size = sample_import2_mojom.Size() | 124 v1.a22.size = sample_import2_mojom.Size() |
124 (data, handles) = v1.Serialize() | 125 (data, handles) = v1.Serialize() |
125 v2 = sample_service_mojom.DefaultsTest.Deserialize(data, handles) | 126 v2 = sample_service_mojom.DefaultsTest.Deserialize(data, handles) |
126 self.assertTrue(_TestEquality(v1, v2)) | 127 self.assertTrue(_TestEquality(v1, v2)) |
127 | 128 |
128 def testFooDeserializationError(self): | 129 def testFooDeserializationError(self): |
129 with self.assertRaises(Exception): | 130 with self.assertRaises(Exception): |
130 sample_service_mojom.Foo.Deserialize("", []) | 131 sample_service_mojom.Foo.Deserialize("", []) |
OLD | NEW |