1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 setuptools-scm, 6 pytest, 7 jinja2, 8 matplotlib, 9 pynose, 10 pillow, 11 pytestCheckHook, 12}: 13 14buildPythonPackage rec { 15 pname = "pytest-mpl"; 16 version = "0.16.1"; 17 format = "setuptools"; 18 19 src = fetchPypi { 20 inherit pname version; 21 hash = "sha256-LVcWgRJOj/X04rnA0EfTfQSZ1rbY8vSaG1DN2ZMQRGk="; 22 }; 23 24 nativeBuildInputs = [ setuptools-scm ]; 25 26 buildInputs = [ pytest ]; 27 28 propagatedBuildInputs = [ 29 jinja2 30 matplotlib 31 pynose 32 pillow 33 ]; 34 35 nativeCheckInputs = [ pytestCheckHook ]; 36 37 disabledTests = [ 38 # Broken since b6e98f18950c2b5dbdc725c1181df2ad1be19fee 39 "test_hash_fails" 40 "test_hash_missing" 41 ]; 42 43 disabledTestPaths = [ 44 # Following are broken since at least a1548780dbc79d76360580691dc1bb4af4e837f6 45 "tests/subtests/test_subtest.py" 46 ]; 47 48 preCheck = '' 49 export HOME=$(mktemp -d) 50 mkdir -p $HOME/.config/matplotlib 51 echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc 52 ln -s $HOME/.config/matplotlib $HOME/.matplotlib 53 ''; 54 55 meta = with lib; { 56 description = "Pytest plugin to help with testing figures output from Matplotlib"; 57 homepage = "https://github.com/matplotlib/pytest-mpl"; 58 license = licenses.bsd3; 59 maintainers = [ ]; 60 }; 61}