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

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

Issue 509863002: Remove python bindings unittests from the build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « mojo/python/tests/BUILD.gn ('k') | mojo/python/tests/test_core.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 sys 6 import sys
7 import time 7 import time
8 import unittest 8 import unittest
9 9
10 # Setup sys path
11 for path in sys.argv[1:]:
12 sys.path.append(path)
13
14 # pylint: disable=F0401 10 # pylint: disable=F0401
15 from mojo.embedder import init as init_embedder 11 from mojo.embedder import init as init_embedder
16 from mojo import system 12 from mojo import system
17 13
18 DATA_SIZE = 1024 14 DATA_SIZE = 1024
19 15
20 16
21 def get_random_buffer(size): 17 def get_random_buffer(size):
22 random.seed(size) 18 random.seed(size)
23 return bytearray(''.join(chr(random.randint(0, 255)) for i in xrange(size))) 19 return bytearray(''.join(chr(random.randint(0, 255)) for i in xrange(size)))
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 self.assertEquals(data, buf2.buffer) 301 self.assertEquals(data, buf2.buffer)
306 self.assertEquals(buf1.buffer, buf2.buffer) 302 self.assertEquals(buf1.buffer, buf2.buffer)
307 303
308 304
309 if __name__ == '__main__': 305 if __name__ == '__main__':
310 suite = unittest.TestLoader().loadTestsFromTestCase(CoreTest) 306 suite = unittest.TestLoader().loadTestsFromTestCase(CoreTest)
311 test_results = unittest.TextTestRunner(verbosity=0).run(suite) 307 test_results = unittest.TextTestRunner(verbosity=0).run(suite)
312 if not test_results.wasSuccessful(): 308 if not test_results.wasSuccessful():
313 sys.exit(1) 309 sys.exit(1)
314 sys.exit(0) 310 sys.exit(0)
OLDNEW
« no previous file with comments | « mojo/python/tests/BUILD.gn ('k') | mojo/python/tests/test_core.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698