예제 #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")