OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/python |
| 2 # Copyright (c) 2010 The Chromium OS 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. |
| 5 import subprocess |
| 6 import unittest |
| 7 |
| 8 import builder |
| 9 |
| 10 |
| 11 class BuilderTest(unittest.TestCase): |
| 12 def testOutputOf(self): |
| 13 self.assertRaises(subprocess.CalledProcessError, |
| 14 builder._OutputOf, ['/bin/false']) |
| 15 |
| 16 hello = 'hello, world' |
| 17 self.assertEqual(hello + '\n', |
| 18 builder._OutputOf(['/bin/echo', hello])) |
| 19 |
| 20 |
| 21 if __name__ == '__main__': |
| 22 unittest.main() |
OLD | NEW |