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