Merge pull request #114907 from dotlambda/datadog-fix

[staging-next] pythonPackages.datadog: fix tests
This commit is contained in:
Sandro 2021-03-03 19:36:06 +01:00 committed by GitHub
commit 7fe25d37fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,19 @@
{ lib, buildPythonPackage, fetchPypi, pythonOlder { lib
, decorator, requests, simplejson, pillow, typing , buildPythonPackage
, nose, mock, pytest, freezegun }: , fetchPypi
, pythonOlder
, decorator
, requests
, typing
, configparser
, click
, freezegun
, mock
, pytestCheckHook
, pytest-vcr
, python-dateutil
, vcrpy
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "datadog"; pname = "datadog";
@ -15,13 +28,30 @@ buildPythonPackage rec {
find . -name '*.pyc' -exec rm {} \; find . -name '*.pyc' -exec rm {} \;
''; '';
propagatedBuildInputs = [ decorator requests simplejson pillow ] propagatedBuildInputs = [ decorator requests ]
++ lib.optionals (pythonOlder "3.5") [ typing ]; ++ lib.optional (pythonOlder "3.5") typing
++ lib.optional (pythonOlder "3.0") configparser;
checkInputs = [ nose mock pytest freezegun ]; checkInputs = [
checkPhase = '' click
pytest tests/unit freezegun
''; mock
pytestCheckHook
pytest-vcr
python-dateutil
vcrpy
];
disabledTestPaths = [
"tests/unit/dogstatsd/test_statsd.py" # does not work in sandbox
];
disabledTests = [
"test_default_settings_set"
"test_threadstats_thread_safety"
];
pythonImportsCheck = [ "datadog" ];
meta = with lib; { meta = with lib; {
description = "The Datadog Python library"; description = "The Datadog Python library";