python311Packages.mockfs: init at 1.1.4
Packaged for pyatv tests.
This commit is contained in:
parent
00e2c926b4
commit
e4d383983d
2 changed files with 49 additions and 0 deletions
47
pkgs/development/python-modules/mockfs/default.nix
Normal file
47
pkgs/development/python-modules/mockfs/default.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, setuptools
|
||||
, setuptools-scm
|
||||
, wheel
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mockfs";
|
||||
version = "1.1.4";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mockfs";
|
||||
repo = "mockfs";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-JwSkOI0dz9ZetfE0ZL3CthvcCSXGFYX+yQZy/oC6VBk=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i '/addopts/d' pytest.ini
|
||||
'';
|
||||
|
||||
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
wheel
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "mockfs" ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple mock filesystem for use in unit tests";
|
||||
homepage = "https://github.com/mockfs/mockfs";
|
||||
changelog = "https://github.com/mockfs/mockfs/blob/${src.rev}/CHANGES.rst";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
|
@ -6824,6 +6824,8 @@ self: super: with self; {
|
|||
|
||||
mock = callPackage ../development/python-modules/mock { };
|
||||
|
||||
mockfs = callPackage ../development/python-modules/mockfs { };
|
||||
|
||||
mockito = callPackage ../development/python-modules/mockito { };
|
||||
|
||||
mock-open = callPackage ../development/python-modules/mock-open { };
|
||||
|
|
Loading…
Reference in a new issue