From 56d54a2b50f242abe812cd8214b31ede98cb1d01 Mon Sep 17 00:00:00 2001 From: sigma67 Date: Sun, 27 Aug 2023 23:08:50 +0200 Subject: [PATCH] fix readthedocs --- .readthedocs.yml | 1 + docs/source/conf.py | 19 +------------------ docs/source/requirements.txt | 2 ++ tests/test.py | 4 ++-- 4 files changed, 6 insertions(+), 20 deletions(-) create mode 100644 docs/source/requirements.txt diff --git a/.readthedocs.yml b/.readthedocs.yml index 2cab60b..6a01ec8 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -7,6 +7,7 @@ build: python: install: + - requirements: docs/source/requirements.txt - method: pip path: . diff --git a/docs/source/conf.py b/docs/source/conf.py index 88c05c1..c9dd88f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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" \ No newline at end of file diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt new file mode 100644 index 0000000..15afc85 --- /dev/null +++ b/docs/source/requirements.txt @@ -0,0 +1,2 @@ +sphinx<=7 +sphinx-rtd-theme \ No newline at end of file diff --git a/tests/test.py b/tests/test.py index 3304804..f544370 100644 --- a/tests/test.py +++ b/tests/test.py @@ -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) @@ -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)