fix readthedocs
This commit is contained in:
parent
c5dca0ae34
commit
56d54a2b50
4 changed files with 6 additions and 20 deletions
|
|
@ -7,6 +7,7 @@ build:
|
||||||
|
|
||||||
python:
|
python:
|
||||||
install:
|
install:
|
||||||
|
- requirements: docs/source/requirements.txt
|
||||||
- method: pip
|
- method: pip
|
||||||
path: .
|
path: .
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,21 +50,4 @@ templates_path = ['_templates']
|
||||||
# This pattern also affects html_static_path and html_extra_path.
|
# This pattern also affects html_static_path and html_extra_path.
|
||||||
exclude_patterns = []
|
exclude_patterns = []
|
||||||
|
|
||||||
# -- Options for HTML output -------------------------------------------------
|
html_theme = "sphinx_rtd_theme"
|
||||||
|
|
||||||
# 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'
|
|
||||||
|
|
||||||
2
docs/source/requirements.txt
Normal file
2
docs/source/requirements.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
sphinx<=7
|
||||||
|
sphinx-rtd-theme
|
||||||
|
|
@ -83,7 +83,7 @@ class TestYTMusic(unittest.TestCase):
|
||||||
query = "edm playlist"
|
query = "edm playlist"
|
||||||
self.assertRaises(Exception, self.yt_auth.search, query, filter="song")
|
self.assertRaises(Exception, self.yt_auth.search, query, filter="song")
|
||||||
self.assertRaises(Exception, self.yt_auth.search, query, scope="upload")
|
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:
|
for q in queries:
|
||||||
with self.subTest():
|
with self.subTest():
|
||||||
results = self.yt_brand.search(q)
|
results = self.yt_brand.search(q)
|
||||||
|
|
@ -413,7 +413,7 @@ class TestYTMusic(unittest.TestCase):
|
||||||
|
|
||||||
def test_get_playlist_foreign(self):
|
def test_get_playlist_foreign(self):
|
||||||
self.assertRaises(Exception, self.yt.get_playlist, "PLABC")
|
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['duration']), 5)
|
||||||
self.assertGreater(len(playlist["tracks"]), 200)
|
self.assertGreater(len(playlist["tracks"]), 200)
|
||||||
self.assertNotIn("suggestions", playlist)
|
self.assertNotIn("suggestions", playlist)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue