Skip to content

Commit

Permalink
Update ftintitle.contains_feat unit tests
Browse files Browse the repository at this point in the history
Since the `for_artist` keyword has been removed from
`ftintitle.contains_feat`, the unit tests need to be updated.
This includes the deletion of the test cases that test the
`for_artist=True` delimiters.
  • Loading branch information
klb2 committed Sep 30, 2024
1 parent ed627c0 commit 669307c
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions test/plugins/test_ftintitle.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,31 +175,20 @@ def test_split_on_feat(self):
parts = ftintitle.split_on_feat("Alice defeat Bob")
assert parts == ("Alice defeat Bob", None)

def test_contains_feat_artist(self):
def test_contains_feat(self):
assert ftintitle.contains_feat("Alice ft. Bob")
assert ftintitle.contains_feat("Alice feat. Bob")
assert ftintitle.contains_feat("Alice feat Bob")
assert ftintitle.contains_feat("Alice featuring Bob")
assert ftintitle.contains_feat("Alice & Bob")
assert ftintitle.contains_feat("Alice and Bob")
assert ftintitle.contains_feat("Alice With Bob")
assert ftintitle.contains_feat("Alice (ft. Bob)")
assert ftintitle.contains_feat("Alice (feat. Bob)")
assert ftintitle.contains_feat("Alice [ft. Bob]")
assert ftintitle.contains_feat("Alice [feat. Bob]")
assert not ftintitle.contains_feat("Alice defeat Bob")
assert not ftintitle.contains_feat("Aliceft.Bob")
assert not ftintitle.contains_feat("Alice (defeat Bob)")

def test_contains_feat_title(self):
assert ftintitle.contains_feat(
"Live and Let Go (feat. Alice)", for_artist=False
)
assert ftintitle.contains_feat(
"Live and Let Go [feat. Alice]", for_artist=False
)
assert ftintitle.contains_feat(
"Live and Let Go feat. Alice", for_artist=False
)
assert not ftintitle.contains_feat("Live and Let Go", for_artist=False)
assert not ftintitle.contains_feat("Come With Me", for_artist=False)
assert ftintitle.contains_feat("Live and Let Go (feat. Alice)")
assert ftintitle.contains_feat("Live and Let Go [feat. Alice]")
assert ftintitle.contains_feat("Live and Let Go feat. Alice")
assert not ftintitle.contains_feat("Live and Let Go")
assert not ftintitle.contains_feat("Come With Me")

0 comments on commit 669307c

Please sign in to comment.