From cbdee318dac44cee1262de92951dcd977576558d Mon Sep 17 00:00:00 2001 From: lucasew Date: Mon, 30 Dec 2024 15:50:58 -0300 Subject: [PATCH] flexget: minor tweaks, enable tests on linux Signed-off-by: lucasew --- pkgs/by-name/fl/flexget/package.nix | 76 ++++++++++++++++--- .../python-modules/flask-restx/default.nix | 3 + 2 files changed, 70 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/fl/flexget/package.nix b/pkgs/by-name/fl/flexget/package.nix index 58d027701ec9..7ca46e9e1cdb 100644 --- a/pkgs/by-name/fl/flexget/package.nix +++ b/pkgs/by-name/fl/flexget/package.nix @@ -1,10 +1,11 @@ { lib, - python3, + python3Packages, fetchFromGitHub, + stdenv, }: -python3.pkgs.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "flexget"; version = "3.13.5"; pyproject = true; @@ -20,9 +21,9 @@ python3.pkgs.buildPythonApplication rec { # relax dep constrains, keep environment constraints pythonRelaxDeps = true; - build-system = with python3.pkgs; [ setuptools ]; + build-system = with python3Packages; [ setuptools ]; - dependencies = with python3.pkgs; [ + dependencies = with python3Packages; [ # See https://github.com/Flexget/Flexget/blob/master/pyproject.toml # and https://github.com/Flexget/Flexget/blob/develop/requirements.txt apscheduler @@ -40,6 +41,7 @@ python3.pkgs.buildPythonApplication rec { pyrss2gen python-dateutil pyyaml + rarfile rebulk requests rich @@ -66,6 +68,7 @@ python3.pkgs.buildPythonApplication rec { deluge-client cloudscraper python-telegram-bot + boto3 ]; pythonImportsCheck = [ @@ -93,14 +96,69 @@ python3.pkgs.buildPythonApplication rec { "flexget.plugins.services.pogcal_acquired" ]; - # ~400 failures - doCheck = false; + nativeCheckInputs = [ + python3Packages.pytestCheckHook + python3Packages.pytest-vcr + python3Packages.paramiko + ]; - meta = with lib; { + doCheck = !stdenv.isDarwin; + + disabledTests = [ + # reach the Internet + "TestExistsMovie" + "TestImdb" + "TestImdbLookup" + "TestImdbParser" + "TestInputHtml" + "TestInputSites" + "TestNfoLookupWithMovies" + "TestNpoWatchlistInfo" + "TestNpoWatchlistLanguageTheTVDBLookup" + "TestNpoWatchlistPremium" + "TestPlex" + "TestRadarrListActions" + "TestRssOnline" + "TestSeriesRootAPI" + "TestSftpDownload" + "TestSftpList" + "TestSonarrListActions" + "TestSubtitleList" + "TestTMDBMovieLookupAPI" + "TestTVDBEpisodeABSLookupAPI" + "TestTVDBEpisodeAirDateLookupAPI" + "TestTVDBEpisodeLookupAPI" + "TestTVDBExpire" + "TestTVDBFavorites" + "TestTVDBLanguages" + "TestTVDBList" + "TestTVDBLookup" + "TestTVDBLookup" + "TestTVDBSeriesActorsLookupAPI" + "TestTVDBSeriesLookupAPI" + "TestTVDSearchIMDBLookupAPI" + "TestTVDSearchNameLookupAPI" + "TestTVDSearchZAP2ITLookupAPI" + "TestTVMAzeSeriesLookupAPI" + "TestTVMazeSeasonLookup" + "TestTVMazeShowLookup" + "TestTVMazeUnicodeLookup" + "TestTaskParsing::test_selected_parser_cleared" + "TestTheTVDBLanguages" + "TestTheTVDBList" + "TestTmdbLookup" + "TestURLRewriters" + "TestURLRewriters::test_ettv" + # others + "TestRegexp" + "TestYamlLists" + ]; + + meta = { homepage = "https://flexget.com/"; changelog = "https://github.com/Flexget/Flexget/releases/tag/v${version}"; description = "Multipurpose automation tool for all of your media"; - license = licenses.mit; - maintainers = with maintainers; [ pbsds ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ pbsds ]; }; } diff --git a/pkgs/development/python-modules/flask-restx/default.nix b/pkgs/development/python-modules/flask-restx/default.nix index a817e75cb91b..2a40ee42ea4c 100644 --- a/pkgs/development/python-modules/flask-restx/default.nix +++ b/pkgs/development/python-modules/flask-restx/default.nix @@ -17,6 +17,7 @@ pytest-flask, pytest-mock, pytest-benchmark, + pytest-vcr, pytestCheckHook, setuptools, }: @@ -55,6 +56,7 @@ buildPythonPackage rec { pytest-benchmark pytest-flask pytest-mock + pytest-vcr pytestCheckHook ]; @@ -70,6 +72,7 @@ buildPythonPackage rec { ]; disabledTests = [ + "test_specs_endpoint_host_and_subdomain" # broken in werkzeug 2.3 upgrade "test_media_types_method" "test_media_types_q"