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