mopidy-youtube: enable tests

+39 -12
+39 -12
pkgs/applications/audio/mopidy/youtube.nix
··· 1 - { lib, python3Packages, mopidy }: 2 3 - python3Packages.buildPythonApplication rec { 4 pname = "mopidy-youtube"; 5 version = "3.4"; 6 7 - src = python3Packages.fetchPypi { 8 - inherit version; 9 - pname = "Mopidy-YouTube"; 10 - sha256 = "sha256-996MNByMcKq1woDGK6jsmAHS9TOoBrwSGgPmcShvTRw="; 11 - }; 12 13 - postPatch = "sed s/bs4/beautifulsoup4/ -i setup.cfg"; 14 15 - propagatedBuildInputs = with python3Packages; [ 16 beautifulsoup4 17 cachetools 18 youtube-dl 19 ytmusicapi 20 - ] ++ [ mopidy ]; 21 22 - doCheck = false; 23 24 meta = with lib; { 25 description = "Mopidy extension for playing music from YouTube"; 26 license = licenses.asl20; 27 - maintainers = [ maintainers.spwhitt ]; 28 }; 29 }
··· 1 + { lib 2 + , fetchFromGitHub 3 + , python3 4 + , mopidy 5 + }: 6 7 + python3.pkgs.buildPythonApplication rec { 8 pname = "mopidy-youtube"; 9 version = "3.4"; 10 11 + disabled = python3.pythonOlder "3.7"; 12 13 + src = fetchFromGitHub { 14 + owner = "natumbri"; 15 + repo = pname; 16 + rev = "v${version}"; 17 + sha256 = "0lm6nn926qkrwzvj64yracdixfrnv5zk243msjskrnlzkhgk01rk"; 18 + }; 19 20 + propagatedBuildInputs = with python3.pkgs; [ 21 beautifulsoup4 22 cachetools 23 + pykka 24 + requests 25 youtube-dl 26 ytmusicapi 27 + ] ++ [ 28 + mopidy 29 + ]; 30 + 31 + checkInputs = with python3.pkgs; [ 32 + vcrpy 33 + pytestCheckHook 34 + ]; 35 + 36 + disabledTests = [ 37 + # Test requires a YouTube API key 38 + "test_get_default_config" 39 + ]; 40 + 41 + disabledTestPaths = [ 42 + # Fails with an import error 43 + "tests/test_backend.py" 44 + ]; 45 46 + pythonImportsCheck = [ 47 + "mopidy_youtube" 48 + ]; 49 50 meta = with lib; { 51 description = "Mopidy extension for playing music from YouTube"; 52 + homepage = "https://github.com/natumbri/mopidy-youtube"; 53 license = licenses.asl20; 54 + maintainers = with maintainers; [ spwhitt ]; 55 }; 56 }