Exemplo n.º 1
0
 def test_path_with_empty_path_segment(self):
     assert score_path_match_length('./foo/bar/baz', 'foo/bar/baz') == 3
Exemplo n.º 2
0
 def test_partial_match_paths(self):
     assert score_path_match_length('foo/bar/baz', 'bar/baz') == 2
     assert score_path_match_length('foo/bar/baz', 'baz') == 1
Exemplo n.º 3
0
 def test_why_is_this_zero(self):
     assert score_path_match_length('foo/bar/baz', 'foo') == 0
Exemplo n.º 4
0
 def test_equal_paths(self):
     assert score_path_match_length("foo/bar/baz", "foo/bar/baz") == 3
Exemplo n.º 5
0
 def test_equal_paths(self):
     assert score_path_match_length('foo/bar/baz', 'foo/bar/baz') == 3
Exemplo n.º 6
0
 def test_path_with_empty_path_segment(self):
     assert score_path_match_length("./foo/bar/baz", "foo/bar/baz") == 3
Exemplo n.º 7
0
 def test_case_insensitive_comparison(self):
     assert score_path_match_length("./Foo/Bar/BAZ", "foo/bar/baz") == 3
Exemplo n.º 8
0
 def test_partial_match_paths(self):
     assert score_path_match_length("foo/bar/baz", "bar/baz") == 2
     assert score_path_match_length("foo/bar/baz", "baz") == 1
Exemplo n.º 9
0
 def test_prefix_no_score(self):
     assert score_path_match_length("foo/bar/baz", "foo") == 0
Exemplo n.º 10
0
 def test_why_is_this_zero(self):
     assert score_path_match_length('foo/bar/baz', 'foo') == 0
Exemplo n.º 11
0
 def test_path_with_empty_path_segment(self):
     assert score_path_match_length('./foo/bar/baz', 'foo/bar/baz') == 3
Exemplo n.º 12
0
 def test_partial_match_paths(self):
     assert score_path_match_length('foo/bar/baz', 'bar/baz') == 2
     assert score_path_match_length('foo/bar/baz', 'baz') == 1
Exemplo n.º 13
0
 def test_equal_paths(self):
     assert score_path_match_length('foo/bar/baz', 'foo/bar/baz') == 3
Exemplo n.º 14
0
def test_score_path_match_length():
    assert score_path_match_length('foo/bar/baz', 'foo/bar/baz') == 3
    assert score_path_match_length('foo/bar/baz', 'bar/baz') == 2
    assert score_path_match_length('foo/bar/baz', 'baz') == 1
    assert score_path_match_length('foo/bar/baz', 'foo') == 0
    assert score_path_match_length('./foo/bar/baz', 'foo/bar/baz') == 3
Exemplo n.º 15
0
def test_score_path_match_length():
    assert score_path_match_length('foo/bar/baz', 'foo/bar/baz') == 3
    assert score_path_match_length('foo/bar/baz', 'bar/baz') == 2
    assert score_path_match_length('foo/bar/baz', 'baz') == 1
    assert score_path_match_length('foo/bar/baz', 'foo') == 0
    assert score_path_match_length('./foo/bar/baz', 'foo/bar/baz') == 3
Exemplo n.º 16
0
 def test_prefix_no_score(self):
     assert score_path_match_length('foo/bar/baz', 'foo') == 0