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

Side by Side Diff: native_client_sdk/src/build_tools/tests/verify_ppapi_test.py

Issue 720233003: [NaCl SDK] Convert python scripts from optparse to argparse. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 import sys 7 import sys
8 import unittest 8 import unittest
9 9
10 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) 10 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
11 BUILD_TOOLS_DIR = os.path.dirname(SCRIPT_DIR) 11 BUILD_TOOLS_DIR = os.path.dirname(SCRIPT_DIR)
12 CHROME_SRC = os.path.dirname(os.path.dirname(os.path.dirname(BUILD_TOOLS_DIR))) 12 CHROME_SRC = os.path.dirname(os.path.dirname(os.path.dirname(BUILD_TOOLS_DIR)))
13 MOCK_DIR = os.path.join(CHROME_SRC, "third_party", "pymock") 13 MOCK_DIR = os.path.join(CHROME_SRC, 'third_party', 'pymock')
14 14
15 # For the mock library 15 # For the mock library
16 sys.path.append(MOCK_DIR) 16 sys.path.append(MOCK_DIR)
17 import mock 17 import mock
18 18
19 sys.path.append(BUILD_TOOLS_DIR) 19 sys.path.append(BUILD_TOOLS_DIR)
20 import verify_ppapi 20 import verify_ppapi
21 21
22 22
23 class TestPartition(unittest.TestCase): 23 class TestPartition(unittest.TestCase):
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 ] 184 ]
185 result = verify_ppapi.VerifyOrPrintError( 185 result = verify_ppapi.VerifyOrPrintError(
186 dsc_filename, dsc_sources_and_headers, changed_filenames, 186 dsc_filename, dsc_sources_and_headers, changed_filenames,
187 removed_filenames, is_private=True) 187 removed_filenames, is_private=True)
188 self.assertFalse(result) 188 self.assertFalse(result)
189 self.assertTrue(sys_stderr.write.called) 189 self.assertTrue(sys_stderr.write.called)
190 190
191 191
192 if __name__ == '__main__': 192 if __name__ == '__main__':
193 unittest.main() 193 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698