コード例 #1
0
def test_hashtags():
    month = Month(2000, 10)
    day = Day(month, 20)
    assert day.hashtags == []
    day.text = '#tag'
    assert day.hashtags == ['tag']
    day.text = 'abc #tag'
    assert day.hashtags == ['tag']
    day.text = 'abc #tag_with_longer_name'
    assert day.hashtags == ['tag_with_longer_name']
    day.text = 'abc #tag def'
    assert day.hashtags == ['tag']
コード例 #2
0
def test_hashtags():
    month = Month(2000, 10)
    day = Day(month, 20)
    assert day.hashtags == []
    day.text = "#tag"
    assert day.hashtags == ["tag"]
    day.text = "abc #tag"
    assert day.hashtags == ["tag"]
    day.text = "abc #tag_with_longer_name"
    assert day.hashtags == ["tag_with_longer_name"]
    day.text = "abc #tag def"
    assert day.hashtags == ["tag"]
コード例 #3
0
ファイル: test_day.py プロジェクト: AndychenCL/rednotebook
def test_hashtags():
    month = Month(2000, 10)
    day = Day(month, 20)
    assert day.hashtags == []
    day.text = '#tag'
    assert day.hashtags == ['tag']
    day.text = 'abc #tag'
    assert day.hashtags == ['tag']
    day.text = 'abc #tag_with_longer_name'
    assert day.hashtags == ['tag_with_longer_name']
    day.text = 'abc #tag def'
    assert day.hashtags == ['tag']