示例#1
0
 def when_no_output():
     expect(get_version('echo', argument='')) == ""
示例#2
0
 def with_no_argument():
     expect(get_version('pip', argument='')).contains("Usage:")
示例#3
0
 def when_found():
     expect(get_version('python')).contains("Python ")
示例#4
0
 def with_custom_argument():
     expect(get_version('python', argument='-V')).contains("Python ")
示例#5
0
 def when_missing():
     expect(get_version('foobar')) == "sh: command not found: foobar"