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

Unified Diff: native_client_sdk/src/tools/tests/nacl_config_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « native_client_sdk/src/tools/tests/httpd_test.py ('k') | native_client_sdk/src/tools/tests/sel_ldr_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/tools/tests/nacl_config_test.py
diff --git a/native_client_sdk/src/tools/tests/nacl_config_test.py b/native_client_sdk/src/tools/tests/nacl_config_test.py
index 31957c59aeb97ba4b6a283ce2a523810a78fc4ba..b0cbe26f28778dddb086cbf888beeb813a789b91 100755
--- a/native_client_sdk/src/tools/tests/nacl_config_test.py
+++ b/native_client_sdk/src/tools/tests/nacl_config_test.py
@@ -10,7 +10,7 @@ import unittest
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
TOOLS_DIR = os.path.dirname(SCRIPT_DIR)
CHROME_SRC = os.path.dirname(os.path.dirname(os.path.dirname(TOOLS_DIR)))
-MOCK_DIR = os.path.join(CHROME_SRC, "third_party", "pymock")
+MOCK_DIR = os.path.join(CHROME_SRC, 'third_party', 'pymock')
# For the mock library
sys.path.append(MOCK_DIR)
@@ -40,6 +40,13 @@ class TestNaclConfig(unittest.TestCase):
self.patches.append(patch)
return patch.start()
+ @mock.patch('nacl_config.GetCFlags')
+ def testMainArgParsing(self, mock_get_cflags):
+ mock_get_cflags.return_value = 'flags'
+ with mock.patch('sys.stdout'):
+ nacl_config.main(['--cflags'])
+ mock_get_cflags.assert_called()
+
def testCFlags(self):
cases = {
'newlib': '-I/sdk_root/include -I/sdk_root/include/newlib',
« no previous file with comments | « native_client_sdk/src/tools/tests/httpd_test.py ('k') | native_client_sdk/src/tools/tests/sel_ldr_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698