3
0
Fork 0
forked from mirrors/nixpkgs

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
, decorator, requests, simplejson, pillow, typing
, nose, mock, pytest, freezegun }:
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, decorator
, requests
, typing
, configparser
, click
, freezegun
, mock
, pytestCheckHook
, pytest-vcr
, python-dateutil
, vcrpy
}:
buildPythonPackage rec {
pname = "datadog";
@ -15,13 +28,30 @@ buildPythonPackage rec {
find . -name '*.pyc' -exec rm {} \;
'';
propagatedBuildInputs = [ decorator requests simplejson pillow ]
++ lib.optionals (pythonOlder "3.5") [ typing ];
propagatedBuildInputs = [ decorator requests ]
++ lib.optional (pythonOlder "3.5") typing
++ lib.optional (pythonOlder "3.0") configparser;
checkInputs = [ nose mock pytest freezegun ];
checkPhase = ''
pytest tests/unit
'';
checkInputs = [
click
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; {
description = "The Datadog Python library";