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
4 # found in the LICENSE file.
10 SCRIPT_DIR
= os
.path
.dirname(os
.path
.abspath(__file__
))
11 BUILD_TOOLS_DIR
= os
.path
.dirname(SCRIPT_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')
15 sys
.path
.append(BUILD_TOOLS_DIR
)
16 sys
.path
.append(MOCK_DIR
)
21 class TestMain(unittest
.TestCase
):
22 """Tests for main() entry point of the script."""
24 def testInvalidArgs(self
):
25 with mock
.patch('sys.stderr'):
26 with self
.assertRaises(SystemExit):
27 test_projects
.main(['--foo'])
30 if __name__
== '__main__':