OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2014 The LUCI Authors. All rights reserved. | 2 # Copyright 2014 The LUCI Authors. All rights reserved. |
3 # Use of this source code is governed under the Apache License, Version 2.0 | 3 # Use of this source code is governed under the Apache License, Version 2.0 |
4 # that can be found in the LICENSE file. | 4 # that can be found in the LICENSE file. |
5 | 5 |
6 import os | 6 import os |
7 import subprocess | 7 import subprocess |
8 import unittest | 8 import unittest |
9 | 9 |
10 import repo_test_util | 10 import repo_test_util |
11 from repo_test_util import ROOT_DIR | 11 from repo_test_util import ROOT_DIR |
12 | 12 |
13 class DocTest(unittest.TestCase): | 13 class DocTest(unittest.TestCase): |
14 def test_doc(self): | 14 def test_doc(self): |
15 script_path = os.path.join(ROOT_DIR, 'recipes.py') | 15 script_path = os.path.join(ROOT_DIR, 'recipes.py') |
16 print [ | |
17 'python', script_path, | |
18 '--package', os.path.join(ROOT_DIR, 'infra', 'config', 'recipes.cfg'), | |
19 'doc'] | |
iannucci
2016/10/15 00:39:45
debugging?
dnj
2016/10/15 00:59:27
yarp
| |
16 exit_code = subprocess.call([ | 20 exit_code = subprocess.call([ |
17 'python', script_path, | 21 'python', script_path, |
18 '--package', os.path.join(ROOT_DIR, 'infra', 'config', 'recipes.cfg'), | 22 '--package', os.path.join(ROOT_DIR, 'infra', 'config', 'recipes.cfg'), |
19 'doc'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) | 23 'doc'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
20 self.assertEqual(0, exit_code) | 24 self.assertEqual(0, exit_code) |
21 | 25 |
22 def test_info(self): | 26 def test_info(self): |
23 script_path = os.path.join(ROOT_DIR, 'recipes.py') | 27 script_path = os.path.join(ROOT_DIR, 'recipes.py') |
24 exit_code = subprocess.call([ | 28 exit_code = subprocess.call([ |
25 'python', script_path, | 29 'python', script_path, |
26 '--package', os.path.join(ROOT_DIR, 'infra', 'config', 'recipes.cfg'), | 30 '--package', os.path.join(ROOT_DIR, 'infra', 'config', 'recipes.cfg'), |
27 'info', '--recipes-dir']) | 31 'info', '--recipes-dir']) |
28 #stdout=subprocess.PIPE, stderr=subprocess.PIPE) | 32 #stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
29 self.assertEqual(0, exit_code) | 33 self.assertEqual(0, exit_code) |
30 | 34 |
31 if __name__ == '__main__': | 35 if __name__ == '__main__': |
32 unittest.TestCase.maxDiff = None | 36 unittest.TestCase.maxDiff = None |
33 unittest.main() | 37 unittest.main() |
OLD | NEW |