forked from mirrors/nixpkgs
Merge pull request #114907 from dotlambda/datadog-fix
[staging-next] pythonPackages.datadog: fix tests
This commit is contained in:
commit
7fe25d37fa
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue