Пример #1
0
def test_find_matches(capfd):
    find_emoji('sun')
    output = capfd.readouterr()[0].lower()
    # some of the results you should get back
    assert 'sunrise' in output
    assert '🌅' in output
    assert 'sunset over buildings' in output
    assert '🌇' in output
    assert 'sun with face' in output
    assert '🌻' in output
Пример #2
0
def test_find_matches(capfd):
    find_emoji("sun")
    output = capfd.readouterr()[0].lower()
    # some of the results you should get back
    assert "sunrise" in output
    assert "🌅" in output
    assert "sunset over buildings" in output
    assert "🌇" in output
    assert "sun with face" in output
    assert "🌻" in output
Пример #3
0
def test_find_no_match(capfd):
    find_emoji('awesome')
    output = capfd.readouterr()[0].lower()
    assert not output.strip() or 'no matches' in output.lower()