示例#1
0
def test_longestString_12():
  assert longestString(["wolf","bar","horse","bear","tiger"])=="horse"  
示例#2
0
def test_longestString_10():
  assert longestString(["foo","wolf","bar","bear"])=="wolf"  
示例#3
0
def test_longestString_11():
  assert longestString(["foo","wolf","bar","rabbit","bear"])=="rabbit"
示例#4
0
def test_longestString_07():
  assert longestString(["foo","bar"])=="foo"
示例#5
0
def test_longestString_09():
  assert longestString(["foo","bear","bar"])=="bear"  
示例#6
0
def test_longestString_06():
  with pytest.raises(ValueError):
    result= longestString("foo")
示例#7
0
def test_longestString_05():
  with pytest.raises(ValueError):
    result= longestString([1,2,"foo"])
示例#8
0
def test_longestString_03():
  with pytest.raises(ValueError):
    result= longestString(["foo",1,2])
示例#9
0
def test_longestString_02():
  with pytest.raises(ValueError):
    result= longestString([])
示例#10
0
def test_longestString_01():
  with pytest.raises(ValueError):
    result= longestString("not a list")