| Index: native_client_sdk/src/tools/tests/getos_test.py
|
| diff --git a/native_client_sdk/src/tools/tests/getos_test.py b/native_client_sdk/src/tools/tests/getos_test.py
|
| index 99ffb95079fb013b12bc39f7b9d89ec570e5a806..b687d9190599f4be3461732761a031db29cd4ce5 100755
|
| --- a/native_client_sdk/src/tools/tests/getos_test.py
|
| +++ b/native_client_sdk/src/tools/tests/getos_test.py
|
| @@ -71,21 +71,23 @@ class TestGetos(TestCaseExtended):
|
| """honors CHROME_PATH environment."""
|
| with mock.patch.dict('os.environ', {'CHROME_PATH': '/dummy/file'}):
|
| expect = "Invalid CHROME_PATH.*/dummy/file"
|
| + platform = getos.GetPlatform()
|
| if hasattr(self, 'assertRaisesRegexp'):
|
| with self.assertRaisesRegexp(getos.Error, expect):
|
| - getos.GetChromePath()
|
| + getos.GetChromePath(platform)
|
| else:
|
| # TODO(sbc): remove this path once we switch to python2.7 everywhere
|
| - self.assertRaises(getos.Error, getos.GetChromePath)
|
| + self.assertRaises(getos.Error, getos.GetChromePath, platform)
|
|
|
| def testGetChromePathCheckExists(self):
|
| """checks that existence of explicitly CHROME_PATH is checked."""
|
| mock_location = '/bin/ls'
|
| - if getos.GetPlatform() == 'win':
|
| + platform = getos.GetPlatform()
|
| + if platform == 'win':
|
| mock_location = 'c:\\nowhere'
|
| with mock.patch.dict('os.environ', {'CHROME_PATH': mock_location}):
|
| with mock.patch('os.path.exists') as mock_exists:
|
| - chrome = getos.GetChromePath()
|
| + chrome = getos.GetChromePath(platform)
|
| self.assertEqual(chrome, mock_location)
|
| mock_exists.assert_called_with(chrome)
|
|
|
|
|