python312Packages.swh-core: enable systemd tests (#393769)
This commit is contained in:
commit
5d1b5b6f16
58
pkgs/development/python-modules/aiohttp-utils/default.nix
Normal file
58
pkgs/development/python-modules/aiohttp-utils/default.nix
Normal file
@ -0,0 +1,58 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
aiohttp,
|
||||
python-mimeparse,
|
||||
gunicorn,
|
||||
mako,
|
||||
pytestCheckHook,
|
||||
webtest-aiohttp,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aiohttp-utils";
|
||||
version = "3.2.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sloria";
|
||||
repo = "aiohttp-utils";
|
||||
tag = version;
|
||||
hash = "sha256-CGKka6nGQ9o4wn6o3YJ3hm8jGbg16NKkCdBA1mKz4bo=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
aiohttp
|
||||
python-mimeparse
|
||||
gunicorn
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"aiohttp_utils"
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
mako
|
||||
pytestCheckHook
|
||||
webtest-aiohttp
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# AssertionError: assert None == 'application/octet-stream'
|
||||
"test_renders_to_json_by_default"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Handy utilities for building aiohttp.web applications";
|
||||
homepage = "https://github.com/sloria/aiohttp-utils";
|
||||
changelog = "https://github.com/sloria/aiohttp-utils/blob/${src.rev}/CHANGELOG.rst";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
};
|
||||
}
|
||||
@ -1,10 +1,11 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
attrs,
|
||||
setuptools,
|
||||
setuptools-scm,
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@ -12,10 +13,11 @@ buildPythonPackage rec {
|
||||
version = "1.0.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit version;
|
||||
pname = "attrs_strict";
|
||||
hash = "sha256-5wSGNiAUbF8qi2Ac1FdNFIkT2yb8Bjb5Qf5CEuQl6v4=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bloomberg";
|
||||
repo = "attrs-strict";
|
||||
tag = version;
|
||||
hash = "sha256-dDOD4Y57E+i8D0S4q+C6t7zjBTsS8q2UFiS22Dsp0Z8=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
@ -29,8 +31,9 @@ buildPythonPackage rec {
|
||||
|
||||
pythonImportsCheck = [ "attrs_strict" ];
|
||||
|
||||
# No tests in the pypi archive
|
||||
doCheck = false;
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/bloomberg/attrs-strict/releases/tag/${version}";
|
||||
|
||||
@ -13,11 +13,14 @@
|
||||
tenacity,
|
||||
setuptools,
|
||||
setuptools-scm,
|
||||
aiohttp-utils,
|
||||
flask,
|
||||
hypothesis,
|
||||
iso8601,
|
||||
lzip,
|
||||
msgpack,
|
||||
postgresql,
|
||||
postgresqlTestHook,
|
||||
psycopg,
|
||||
pylzma,
|
||||
pytestCheckHook,
|
||||
@ -26,6 +29,7 @@
|
||||
pytest-postgresql,
|
||||
pytz,
|
||||
requests-mock,
|
||||
systemd,
|
||||
types-deprecated,
|
||||
types-psycopg2,
|
||||
types-pytz,
|
||||
@ -70,12 +74,15 @@ buildPythonPackage rec {
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
nativeCheckInputs = [
|
||||
aiohttp-utils
|
||||
flask
|
||||
hypothesis
|
||||
iso8601
|
||||
lzip
|
||||
msgpack
|
||||
psycopg
|
||||
postgresql
|
||||
postgresqlTestHook
|
||||
psycopg.optional-dependencies.pool
|
||||
pylzma
|
||||
pytestCheckHook
|
||||
pytest-aiohttp
|
||||
@ -83,6 +90,7 @@ buildPythonPackage rec {
|
||||
pytest-postgresql
|
||||
pytz
|
||||
requests-mock
|
||||
systemd
|
||||
types-deprecated
|
||||
types-psycopg2
|
||||
types-pytz
|
||||
@ -92,29 +100,14 @@ buildPythonPackage rec {
|
||||
pkgs.zstd
|
||||
];
|
||||
|
||||
disabledTests =
|
||||
[
|
||||
# ValueError: Unable to configure handler 'systemd'
|
||||
"test_logging_configure_from_yaml"
|
||||
]
|
||||
++ lib.optionals (stdenv.hostPlatform.isDarwin) [
|
||||
# FileExistsError: [Errno 17] File exists:
|
||||
"test_uncompress_upper_archive_extension"
|
||||
# AssertionError: |500 - 632.1152460000121| not within 100
|
||||
"test_timed_coroutine"
|
||||
"test_timed_start_stop_calls"
|
||||
"test_timed"
|
||||
"test_timed_no_metric"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# ModuleNotFoundError: No module named 'aiohttp_utils'
|
||||
"swh/core/api/tests/test_async.py"
|
||||
"swh/core/api/tests/test_rpc_server_asynchronous.py"
|
||||
# ModuleNotFoundError: No module named 'systemd'
|
||||
"swh/core/tests/test_logger.py"
|
||||
# ModuleNotFoundError: No module named 'psycopg_pool'
|
||||
"swh/core/db/tests"
|
||||
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# FileExistsError: [Errno 17] File exists:
|
||||
"test_uncompress_upper_archive_extension"
|
||||
# AssertionError: |500 - 632.1152460000121| not within 100
|
||||
"test_timed_coroutine"
|
||||
"test_timed_start_stop_calls"
|
||||
"test_timed"
|
||||
"test_timed_no_metric"
|
||||
];
|
||||
|
||||
meta = {
|
||||
|
||||
@ -314,6 +314,8 @@ self: super: with self; {
|
||||
|
||||
aiohttp-swagger = callPackage ../development/python-modules/aiohttp-swagger { };
|
||||
|
||||
aiohttp-utils = callPackage ../development/python-modules/aiohttp-utils { };
|
||||
|
||||
aiohttp-wsgi = callPackage ../development/python-modules/aiohttp-wsgi { };
|
||||
|
||||
aiohue = callPackage ../development/python-modules/aiohue { };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user