summary refs log tree commit diff
path: root/pkgs/development/python-modules/subunit/default.nix
blob: c59626fc85c3f005bff4df221ba9dc2b1e2abdbd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ buildPythonPackage
# pkgs dependencies
, check
, cppunit
, pkg-config
, subunit

# python dependencies
, fixtures
, hypothesis
, pytest
, testscenarios
, testtools
}:

buildPythonPackage {
  inherit (subunit) name src meta;

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ check cppunit ];
  propagatedBuildInputs = [ testtools ];

  checkInputs = [ testscenarios hypothesis fixtures pytest ];
  # ignore tests which call shell code, or call methods which haven't been implemented
  checkPhase = ''
    pytest python/subunit \
      --ignore=python/subunit/tests/test_{output_filter,test_protocol{,2}}.py
  '';

  postPatch = ''
    sed -i 's/version=VERSION/version="${subunit.version}"/' setup.py
  '';
}