2 # Copyright 2013 The Swarming Authors. All rights reserved.
3 # Use of this source code is governed under the Apache License, Version 2.0 that
4 # can be found in the LICENSE file.
12 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
15 class ListTestCases(unittest.TestCase):
16 def capture(self, cmd):
18 [sys.executable] + cmd,
19 stdout=subprocess.PIPE,
20 stderr=subprocess.PIPE,
22 universal_newlines=True)
23 out, err = p.communicate()
24 self.assertEqual('', err)
25 self.assertEqual(0, p.returncode)
28 def test_default(self):
32 os.path.join('tests', 'gtest_fake', 'gtest_fake_pass.py'),
34 self.assertEqual('Foo.Bar/3\nFoo.Bar1\nFoo.Bar2\n', out)
37 if __name__ == '__main__':
39 level=(logging.DEBUG if '-v' in sys.argv else logging.FATAL))