[ytdl] run yt-dlp tests with latest code from master (#3989)

Only use PyPI version for Python 3.6, since that's no longer supported
by the current codebase.
pull/4022/head
Mike Fährmann 1 year ago
parent 6a860876bc
commit aa731c4298
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -26,13 +26,26 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
env:
PYV: ${{ matrix.python-version }}
run: |
pip install -r requirements.txt
pip install "flake8<4" "importlib-metadata<5"
pip install youtube-dl
if [[ "$PYV" != "3.4" && "$PYV" != "3.5" ]]; then pip install yt-dlp; fi
- name: Install yt-dlp
run: |
case "${{ matrix.python-version }}" in
3.4|3.5)
# don't install yt-dlp
;;
3.6)
# install from PyPI
pip install yt-dlp
;;
*)
# install from master
pip install https://github.com/yt-dlp/yt-dlp/archive/refs/heads/master.tar.gz
;;
esac
- name: Lint with flake8
run: |

@ -6,4 +6,4 @@
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
__version__ = "1.25.3"
__version__ = "1.25.4-dev"

@ -238,7 +238,7 @@ class Test_CommandlineArguments_YtDlp(Test_CommandlineArguments):
@classmethod
def setUpClass(cls):
super().setUpClass()
if cls.module.version.__version__ > "2023.03.04":
if cls.module.version.__version__ > "2022.07.18": # last 3.6 release
cls.test_geo_bypass = cls._test_geo_bypass_xff
def test_retries_extractor(self):
@ -276,6 +276,15 @@ class Test_CommandlineArguments_YtDlp(Test_CommandlineArguments):
})
def _test_geo_bypass_xff(self):
self._(["--xff", "default"],
"geo_bypass", "default")
self._(["--xff", "never"],
"geo_bypass", "never")
self._(["--xff", "EN"],
"geo_bypass", "EN")
self._(["--xff", "198.51.100.14/24"],
"geo_bypass", "198.51.100.14/24")
self._("--geo-bypass",
"geo_bypass", "default")
self._("--no-geo-bypass",

Loading…
Cancel
Save