Skip to content

Commit

Permalink
improve search coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma67 committed Mar 25, 2023
1 parent e14abac commit 3a03c63
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,15 @@ def test_search(self):
query = "edm playlist"
self.assertRaises(Exception, self.yt_auth.search, query, filter="song")
self.assertRaises(Exception, self.yt_auth.search, query, scope="upload")
results = self.yt.search(query)
self.assertGreater(len(results), 10)
results = self.yt.search("l1qwkfkah2l1qwkfkah2")
self.assertLessEqual(len(results), 2)
queries = ["taylor swift", "taylor swift blank space", "taylor swift fearless"]
for q in queries:
with self.subTest():
results = self.yt_brand.search(q)
self.assertGreater(len(results), 10)
results = self.yt.search(q)
self.assertGreater(len(results), 10)
results = self.yt_auth.search('Martin Stig Andersen - Deteriation', ignore_spelling=True)
self.assertGreater(len(results), 0)
results = self.yt_auth.search(query, filter='songs')
Expand Down

0 comments on commit 3a03c63

Please sign in to comment.