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

Side by Side Diff: mojo/python/tests/bindings_serialization_deserialization_unittest.py

Issue 643853004: mojo: Update PRESBUMIT.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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 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
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("", [])
OLDNEW
« no previous file with comments | « mojo/python/tests/async_wait_unittest.py ('k') | mojo/python/tests/bindings_structs_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698