7 raise ValueError("unexpected number of args")
9 if sys
.argv
[1] == "--gtest_list_tests":
17 elif not sys
.argv
[1].startswith("--gtest_filter="):
18 raise ValueError("unexpected argument: %r" % (sys
.argv
[1]))
20 test_name
= sys
.argv
[1].split('=',1)[1]
21 if test_name
== 'FirstTest.subTestA':
22 print('I am subTest A, I PASS')
23 print('[ PASSED ] 1 test.')
25 elif test_name
== 'FirstTest.subTestB':
26 print('I am subTest B, I am slow')
28 print('[ PASSED ] 1 test.')
30 elif test_name
== 'FirstTest.subTestC':
31 print('I am subTest C, I will hang')
35 raise SystemExit("error: invalid test name: %r" % (test_name
,))