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

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

Issue 843523002: Delete empty mojo python package, and prefix all python packages with mojo_ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 random 5 import random
6 import time 6 import time
7 7
8 import mojo_unittest 8 import mojo_unittest
9 9
10 # pylint: disable=E0611 10 # pylint: disable=E0611
11 from mojo import system 11 import mojo_system as system
12 12
13 DATA_SIZE = 1024 13 DATA_SIZE = 1024
14 14
15 15
16 def _GetRandomBuffer(size): 16 def _GetRandomBuffer(size):
17 random.seed(size) 17 random.seed(size)
18 return bytearray(''.join(chr(random.randint(0, 255)) for i in xrange(size))) 18 return bytearray(''.join(chr(random.randint(0, 255)) for i in xrange(size)))
19 19
20 20
21 class CoreTest(mojo_unittest.MojoTestCase): 21 class CoreTest(mojo_unittest.MojoTestCase):
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 self.assertEquals(system.RESULT_OK, res1) 323 self.assertEquals(system.RESULT_OK, res1)
324 self.assertEquals(system.RESULT_OK, res2) 324 self.assertEquals(system.RESULT_OK, res2)
325 self.assertEquals(DATA_SIZE, len(buf1.buffer)) 325 self.assertEquals(DATA_SIZE, len(buf1.buffer))
326 self.assertEquals(DATA_SIZE, len(buf2.buffer)) 326 self.assertEquals(DATA_SIZE, len(buf2.buffer))
327 self.assertEquals(buf1.buffer, buf2.buffer) 327 self.assertEquals(buf1.buffer, buf2.buffer)
328 328
329 buf1.buffer[:] = data 329 buf1.buffer[:] = data
330 self.assertEquals(data, buf1.buffer) 330 self.assertEquals(data, buf1.buffer)
331 self.assertEquals(data, buf2.buffer) 331 self.assertEquals(data, buf2.buffer)
332 self.assertEquals(buf1.buffer, buf2.buffer) 332 self.assertEquals(buf1.buffer, buf2.buffer)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698