6 raise ValueError("unexpected number of args")
8 if sys
.argv
[1] == "--gtest_list_tests":
18 elif not sys
.argv
[1].startswith("--gtest_filter="):
19 raise ValueError("unexpected argument: %r" % (sys
.argv
[1]))
21 test_name
= sys
.argv
[1].split('=',1)[1]
22 if test_name
== 'FirstTest.subTestA':
23 print('I am subTest A, I PASS')
24 print('[ PASSED ] 1 test.')
26 elif test_name
== 'FirstTest.subTestB':
27 print('I am subTest B, I FAIL')
28 print('And I have two lines of output')
30 elif test_name
in ('ParameterizedTest/0.subTest',
31 'ParameterizedTest/1.subTest'):
32 print('I am a parameterized test, I also PASS')
33 print('[ PASSED ] 1 test.')
36 raise SystemExit("error: invalid test name: %r" % (test_name
,))