Merge pull request #114604 from fabaff/bump-pytest-sanic
This commit is contained in:
commit
3dc889db43
@ -1,28 +1,41 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
|
||||||
, fetchPypi
|
|
||||||
, pytest
|
|
||||||
, aiohttp
|
|
||||||
, async_generator
|
, async_generator
|
||||||
|
, buildPythonPackage
|
||||||
|
, doCheck ? true
|
||||||
|
, fetchFromGitHub
|
||||||
|
, httpx
|
||||||
|
, pytest
|
||||||
|
, pytestCheckHook
|
||||||
|
, sanic
|
||||||
|
, websockets
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pytest-sanic";
|
pname = "pytest-sanic";
|
||||||
version = "1.6.2";
|
version = "1.7.0";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "yunstanford";
|
||||||
sha256 = "6428ed8cc2e6cfa05b92689a8589149aacdc1f0640fcf9673211aa733e6a5209";
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "1zpgnw1lqbll59chv4hgcn31mdql1nv4gw9crbihky3ly3d3ncqi";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
pytest
|
|
||||||
aiohttp
|
|
||||||
async_generator
|
async_generator
|
||||||
|
httpx
|
||||||
|
pytest
|
||||||
|
websockets
|
||||||
];
|
];
|
||||||
|
|
||||||
# circular dependency on sanic
|
checkInputs = [
|
||||||
doCheck = false;
|
sanic
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
inherit doCheck;
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "pytest_sanic" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A pytest plugin for Sanic";
|
description = "A pytest plugin for Sanic";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, buildPythonPackage, fetchPypi
|
{ lib, buildPythonPackage, fetchPypi, doCheck ? true
|
||||||
, aiofiles, httptools, httpx, multidict, ujson, uvloop, websockets
|
, aiofiles, httptools, httpx, multidict, ujson, uvloop, websockets
|
||||||
, pytestCheckHook, beautifulsoup4, gunicorn, httpcore, uvicorn
|
, pytestCheckHook, beautifulsoup4, gunicorn, httpcore, uvicorn
|
||||||
, pytest-asyncio, pytest-benchmark, pytest-dependency, pytest-sanic, pytest-sugar, pytestcov
|
, pytest-asyncio, pytest-benchmark, pytest-dependency, pytest-sanic, pytest-sugar, pytestcov
|
||||||
@ -13,7 +13,7 @@ buildPythonPackage rec {
|
|||||||
sha256 = "06p0lsxqbfbka2yaqlpp0bg5pf7ma44zi6kq7qbb6hhry48dp1w6";
|
sha256 = "06p0lsxqbfbka2yaqlpp0bg5pf7ma44zi6kq7qbb6hhry48dp1w6";
|
||||||
};
|
};
|
||||||
|
|
||||||
patchPhase = ''
|
postPatch = ''
|
||||||
substituteInPlace setup.py \
|
substituteInPlace setup.py \
|
||||||
--replace '"multidict==5.0.0"' '"multidict"' \
|
--replace '"multidict==5.0.0"' '"multidict"' \
|
||||||
--replace '"httpx==0.15.4"' '"httpx"' \
|
--replace '"httpx==0.15.4"' '"httpx"' \
|
||||||
@ -30,14 +30,19 @@ buildPythonPackage rec {
|
|||||||
pytest-asyncio pytest-benchmark pytest-dependency pytest-sanic pytest-sugar pytestcov
|
pytest-asyncio pytest-benchmark pytest-dependency pytest-sanic pytest-sugar pytestcov
|
||||||
];
|
];
|
||||||
|
|
||||||
|
inherit doCheck;
|
||||||
|
|
||||||
disabledTests = [
|
disabledTests = [
|
||||||
"test_gunicorn" # No "examples" directory in pypi distribution.
|
"test_gunicorn" # No "examples" directory in pypi distribution.
|
||||||
"test_logo" # Fails to filter out "DEBUG asyncio:selector_events.py:59 Using selector: EpollSelector"
|
"test_logo" # Fails to filter out "DEBUG asyncio:selector_events.py:59 Using selector: EpollSelector"
|
||||||
"test_zero_downtime" # No "examples.delayed_response.app" module in pypi distribution.
|
"test_zero_downtime" # No "examples.delayed_response.app" module in pypi distribution.
|
||||||
|
"test_reloader_live" # OSError: [Errno 98] error while attempting to bind on address ('127.0.0.1', 42104)
|
||||||
];
|
];
|
||||||
|
|
||||||
__darwinAllowLocalNetworking = true;
|
__darwinAllowLocalNetworking = true;
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "sanic" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A microframework based on uvloop, httptools, and learnings of flask";
|
description = "A microframework based on uvloop, httptools, and learnings of flask";
|
||||||
homepage = "http://github.com/channelcat/sanic/";
|
homepage = "http://github.com/channelcat/sanic/";
|
||||||
|
@ -6358,7 +6358,9 @@ in {
|
|||||||
pytest-runner = self.pytestrunner; # added 2021-01-04
|
pytest-runner = self.pytestrunner; # added 2021-01-04
|
||||||
pytestrunner = callPackage ../development/python-modules/pytestrunner { };
|
pytestrunner = callPackage ../development/python-modules/pytestrunner { };
|
||||||
|
|
||||||
pytest-sanic = callPackage ../development/python-modules/pytest-sanic { };
|
pytest-sanic = callPackage ../development/python-modules/pytest-sanic {
|
||||||
|
sanic = self.sanic.override { doCheck = false; };
|
||||||
|
};
|
||||||
|
|
||||||
pytest-server-fixtures = callPackage ../development/python-modules/pytest-server-fixtures { };
|
pytest-server-fixtures = callPackage ../development/python-modules/pytest-server-fixtures { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user