Merge pull request #40231 from teto/configobj_tests

[RDY] pythonPackages.configobj: enable tests
This commit is contained in:
adisbladis 2018-05-11 12:17:43 +08:00 committed by GitHub
commit c361d5a386
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,19 +1,30 @@
{ stdenv, buildPythonPackage, fetchPypi, six }:
{ stdenv, buildPythonPackage
, fetchFromGitHub
, six
, mock, pytest
}:
buildPythonPackage rec {
pname = "configobj";
version = "5.0.6";
src = fetchPypi {
inherit pname version;
sha256 = "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2";
# Pypi archives don't contain the tests
src = fetchFromGitHub {
owner = "DiffSK";
repo = pname;
rev = "v${version}";
sha256 = "0x97794nk3dfn0i3si9fv7y19jnpnarb34bkdwlz7ii7ag6xihhw";
};
# error: invalid command 'test'
doCheck = false;
propagatedBuildInputs = [ six ];
checkPhase = ''
pytest --deselect=tests/test_configobj.py::test_options_deprecation
'';
checkInputs = [ mock pytest ];
meta = with stdenv.lib; {
description = "Config file reading, writing and validation";
homepage = https://pypi.python.org/pypi/configobj;