コード例 #1
0
ファイル: test_emoji.py プロジェクト: dcribb19/bitesofpy
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
ファイル: test_emoji.py プロジェクト: pogross/bitesofpy
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
ファイル: test_emoji.py プロジェクト: dcribb19/bitesofpy
def test_find_no_match(capfd):
    find_emoji('awesome')
    output = capfd.readouterr()[0].lower()
    assert not output.strip() or 'no matches' in output.lower()