python3Packages.weboob: disable failing tests

This commit is contained in:
Fabian Affolter 2022-01-25 11:06:54 +01:00
parent 78a05d47d4
commit b8882c701d

View File

@ -1,9 +1,9 @@
{ lib, buildPythonPackage, fetchPypi, isPy27
{ lib
, Babel
, buildPythonPackage
, cssselect
, python-dateutil
, feedparser
, futures ? null
, fetchPypi
, gdata
, gnupg
, google-api-python-client
@ -16,6 +16,9 @@
, pillow
, prettytable
, pyqt5
, pytestCheckHook
, python-dateutil
, pythonOlder
, pyyaml
, requests
, simplejson
@ -26,28 +29,18 @@
buildPythonPackage rec {
pname = "weboob";
version = "2.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "1c69vzf8sg8471lcaafpz9iw2q3rfj5hmcpqrs2k59fkgbvy32zw";
};
postPatch = ''
# Disable doctests that require networking:
sed -i -n -e '/^ *def \+pagination *(.*: *$/ {
p; n; p; /"""\|'\'\'\'''/!b
:loop
n; /^ *\(>>>\|\.\.\.\)/ { h; bloop }
x; /^ *\(>>>\|\.\.\.\)/bloop; x
p; /"""\|'\'\'\'''/b
bloop
}; p' weboob/browser/browsers.py weboob/browser/pages.py
'';
checkInputs = [ nose ];
nativeBuildInputs = [ pyqt5 ];
nativeBuildInputs = [
pyqt5
];
propagatedBuildInputs = [
Babel
@ -70,15 +63,35 @@ buildPythonPackage rec {
simplejson
termcolor
unidecode
] ++ lib.optionals isPy27 [ futures ];
];
postPatch = ''
substituteInPlace setup.cfg \
--replace "with-doctest = 1" "" \
--replace "with-coverage = 1" "" \
--replace "weboob.browser.filters.standard," "" \
--replace "weboob.browser.tests.filters," "" \
--replace "weboob.tools.application.formatters.json," "" \
--replace "weboob.tools.application.formatters.table," "" \
--replace "weboob.tools.capabilities.bank.transactions," ""
'';
checkInputs = [
nose
];
checkPhase = ''
nosetests
'';
meta = {
pythonImportsCheck = [
"weboob"
];
meta = with lib; {
description = "Collection of applications and APIs to interact with websites";
homepage = "http://weboob.org";
description = "Collection of applications and APIs to interact with websites without requiring the user to open a browser";
license = lib.licenses.agpl3;
license = licenses.agpl3Plus;
maintainers = with maintainers; [ ];
};
}