1{ lib
2, buildPythonPackage
3, fetchPypi
4, pytest
5, psutil
6}:
7
8buildPythonPackage rec {
9 pname = "pytest-openfiles";
10 version = "0.3.2";
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "e51c91889eb9e4c75f47735efc57a1435f3f1182463600ba7bce7f2556a46884";
15 };
16
17 propagatedBuildInputs = [
18 pytest
19 psutil
20 ];
21
22 checkInputs = [
23 pytest
24 ];
25
26 postConfigure = ''
27 # remove on next release
28 substituteInPlace setup.cfg \
29 --replace "[pytest]" "[tool:pytest]"
30 '';
31
32 checkPhase = ''
33 pytest
34 '';
35
36 meta = with lib; {
37 description = "Pytest plugin for detecting inadvertent open file handles";
38 homepage = https://astropy.org;
39 license = licenses.bsd3;
40 maintainers = [ maintainers.costrouc ];
41 };
42}