Beispiel #1
0
def test_finding_tags():
    "strings.extract_tags_from_line matching simple cases"

    tags = strings.extract_tags_from_line("@one")
    assert_equals(tags, ["one"])
    tags = strings.extract_tags_from_line("  @one  ")
    assert_equals(tags, ["one"])
    tags = strings.extract_tags_from_line("@one @two @three")
    assert_equals(tags, ["one", "two", "three"])
    tags = strings.extract_tags_from_line("  @one @two @three  ")
    assert_equals(tags, ["one", "two", "three"])
    tags = strings.extract_tags_from_line("  @one.two @three_four  ")
    assert_equals(tags, ["one.two", "three_four"])
Beispiel #2
0
def test_finding_tags():
    "strings.extract_tags_from_line matching simple cases"

    tags = strings.extract_tags_from_line("@one")
    assert_equals(tags, ["one"])
    tags = strings.extract_tags_from_line("  @one  ")
    assert_equals(tags, ["one"])
    tags = strings.extract_tags_from_line("@one @two @three")
    assert_equals(tags, ["one", "two", "three"])
    tags = strings.extract_tags_from_line("  @one @two @three  ")
    assert_equals(tags, ["one", "two", "three"])
    tags = strings.extract_tags_from_line("  @one.two @three_four  ")
    assert_equals(tags, ["one.two", "three_four"])
Beispiel #3
0
def test_identifies_tag_lines():
    "strings.extract_tags_from_line not matching anything"
    # No tags tests
    tags = strings.extract_tags_from_line("")
    assert_equals(tags, None)
    tags = strings.extract_tags_from_line("normal line")
    assert_equals(tags, None)
    tags = strings.extract_tags_from_line("Scenario: line with name")
    assert_equals(tags, None)
    tags = strings.extract_tags_from_line(" | example step hash | line |")
    assert_equals(tags, None)
    tags = strings.extract_tags_from_line(
        " | example step hash | line @with | @tag like |")
    assert_equals(tags, None)
Beispiel #4
0
def test_identifies_tag_lines():
    "strings.extract_tags_from_line not matching anything"
    # No tags tests
    tags = strings.extract_tags_from_line("")
    assert_equals(tags, None)
    tags = strings.extract_tags_from_line("normal line")
    assert_equals(tags, None)
    tags = strings.extract_tags_from_line("Scenario: line with name")
    assert_equals(tags, None)
    tags = strings.extract_tags_from_line(" | example step hash | line |")
    assert_equals(tags, None)
    tags = strings.extract_tags_from_line(
        " | example step hash | line @with | @tag like |")
    assert_equals(tags, None)
Beispiel #5
0
def test_dont_find_tags_in_weird_cases():
    "don't find tags in weird cases"
    tags = strings.extract_tags_from_line("  @one two @three @four ")
    assert_equals(tags, None)
Beispiel #6
0
def test_dont_find_tags_in_weird_cases():
    "don't find tags in weird cases"
    tags = strings.extract_tags_from_line("  @one two @three @four ")
    assert_equals(tags, None)