nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #248329 from fabaff/scrapy-fake-useragent-fix

python311Packages.scrapy-fake-useragent: disable failing test

authored by

Fabian Affolter and committed by
GitHub
2dbe9e5f b8392f9e

+39 -4
+39 -4
pkgs/development/python-modules/scrapy-fake-useragent/default.nix
··· 1 - { lib, fetchFromGitHub, buildPythonPackage, pytestCheckHook, pytest-cov, pytest-mock, fake-useragent, faker, scrapy }: 1 + { lib 2 + , buildPythonPackage 3 + , fake-useragent 4 + , faker 5 + , fetchFromGitHub 6 + , pytest-mock 7 + , pytestCheckHook 8 + , pythonOlder 9 + , scrapy 10 + }: 2 11 3 12 buildPythonPackage rec { 4 13 pname = "scrapy-fake-useragent"; 5 14 version = "1.4.4"; 15 + format = "setuptools"; 16 + 17 + disabled = pythonOlder "3.7"; 6 18 7 19 # PyPi tarball is corrupted 8 20 src = fetchFromGitHub { 9 21 owner = "alecxe"; 10 22 repo = pname; 11 23 rev = "59c20d38c58c76618164760d546aa5b989a79b8b"; # no tags 12 - sha256 = "0yb7d51jws665rdfqkmi077w0pjxmb2ni7ysphj7lx7b18whq54j"; 24 + hash = "sha256-khQMOQrrdHokvNqfaMWqXV7AzwGxTuxaLsZoLkNpZ3k="; 13 25 }; 14 26 15 - propagatedBuildInputs = [ fake-useragent faker ]; 27 + postPatch = '' 28 + substituteInPlace pytest.ini \ 29 + --replace " --cov=scrapy_fake_useragent --cov-report=term --cov-report=html --fulltrace" "" 30 + ''; 16 31 17 - nativeCheckInputs = [ pytestCheckHook scrapy pytest-cov pytest-mock ]; 32 + propagatedBuildInputs = [ 33 + fake-useragent 34 + faker 35 + ]; 36 + 37 + nativeCheckInputs = [ 38 + pytest-mock 39 + pytestCheckHook 40 + scrapy 41 + ]; 42 + 43 + pythonImportsCheck = [ 44 + "scrapy_fake_useragent" 45 + ]; 46 + 47 + disabledTests = [ 48 + # AttributeError: 'RetryUserAgentMiddleware' object has no attribute 'EXCEPTIONS_TO_RETRY' 49 + "test_random_ua_set_on_exception" 50 + ]; 18 51 19 52 meta = with lib; { 20 53 description = "Random User-Agent middleware based on fake-useragent"; 21 54 homepage = "https://github.com/alecxe/scrapy-fake-useragent"; 55 + changelog = "https://github.com/alecxe/scrapy-fake-useragent/blob/master/CHANGELOG.rst"; 22 56 license = licenses.mit; 57 + maintainers = with maintainers; [ ]; 23 58 }; 24 59 }