Skip to content

Commit

Permalink
fix readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma67 committed Aug 27, 2023
1 parent c5dca0a commit 56d54a2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 20 deletions.
1 change: 1 addition & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ build:

python:
install:
- requirements: docs/source/requirements.txt
- method: pip
path: .

Expand Down
19 changes: 1 addition & 18 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,4 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
if not on_rtd:
# Try to use the ReadTheDocs theme if installed.
# Default to the default alabaster theme if not.
try:
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
except ImportError:
html_theme = 'alabaster'
else:
# Set theme to 'default' for ReadTheDocs.
html_theme = 'default'

html_theme = "sphinx_rtd_theme"
2 changes: 2 additions & 0 deletions docs/source/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sphinx<=7
sphinx-rtd-theme
4 changes: 2 additions & 2 deletions tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ 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")
queries = ["taylor swift", "taylor swift blank space", "taylor swift fearless"]
queries = ["Maylssi", "qllwlwl", "heun"]
for q in queries:
with self.subTest():
results = self.yt_brand.search(q)
Expand Down Expand Up @@ -413,7 +413,7 @@ def test_subscribe_artists(self):

def test_get_playlist_foreign(self):
self.assertRaises(Exception, self.yt.get_playlist, "PLABC")
playlist = self.yt.get_playlist(sample_playlist, limit=300, suggestions_limit=7)
playlist = self.yt.get_playlist("PLPK7133-0ahmzknIfvNUMNJglX-O1rTd2", limit=300, suggestions_limit=7)
self.assertGreater(len(playlist['duration']), 5)
self.assertGreater(len(playlist["tracks"]), 200)
self.assertNotIn("suggestions", playlist)
Expand Down

0 comments on commit 56d54a2

Please sign in to comment.