about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/nose-randomly/default.nix
blob: afb797d3e2f257053103f3df9ee0e74670243131 (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
34
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, nose
, numpy
}:

buildPythonPackage rec {
  pname = "nose-randomly";
  version = "1.2.6";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    sha256 = "7e483a3d79e13ae760d6ade57ae07ae45bb4b223b61a805e958b4c077116c67c";
  };

  nativeCheckInputs = [ numpy nose ];

  checkPhase = if stdenv.isDarwin then ''
    # Work around "OSError: AF_UNIX path too long"
    TMPDIR="/tmp" nosetests
  '' else ''
    nosetests
  '';

  meta = with lib; {
    description = "Nose plugin to randomly order tests and control random.seed";
    homepage = "https://github.com/adamchainz/nose-randomly";
    license = licenses.bsd3;
    maintainers = [ ];
  };
}