python3Packages.parfive: fix tests, add imports check
commit703aa3a94f21a90d0d354940e16a27cb1d9e15df
authorMartin Weinelt <hexa@darmstadt.ccc.de>
dateTue 2 Nov 2021, 19:49 (5 years ago)
parentf386939
pkgs/development/python-modules/parfive/default.nix+17−10
@@ -1,14 +1,15 @@
11{ lib
22, buildPythonPackage
33, fetchPypi
4−, tqdm
5−, aiohttp
6−, pytest
74, setuptools-scm
5+, aioftp
6+, aiohttp
7+, tqdm
8+, aiofiles
9+, pytestCheckHook
810, pytest-localserver
911, pytest-socket
1012, pytest-asyncio
11−, aioftp
1213}:
1314
1415buildPythonPackage rec {
@@ -30,17 +31,23 @@ buildPythonPackage rec {
3031 aioftp
3132 ];
3233
34+ pythonImportsCheck = [
35+ "parfive"
36+ ];
37+
3338 checkInputs = [
34− pytest
39+ aiofiles
40+ pytest-asyncio
3541 pytest-localserver
3642 pytest-socket
37− pytest-asyncio
43+ pytestCheckHook
3844 ];
3945
40− checkPhase = ''
41− # these two tests require network connection
42− pytest parfive -k "not test_ftp and not test_ftp_http"
43− '';
46+ disabledTests = [
47+ "test_ftp"
48+ "test_ftp_pasv_command"
49+ "test_ftp_http"
50+ ];
4451
4552 meta = with lib; {
4653 description = "A HTTP and FTP parallel file downloader";