summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pytest-relaxed/default.nix
blob: 44a17c89f11fff8ffda39772e95de983ec22f2a9 (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
  lib,
  buildPythonPackage,
  decorator,
  fetchPypi,
  invoke,
  pytest,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "pytest-relaxed";
  version = "2.0.2";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-lW6gKOww27+2gN2Oe0p/uPgKI5WV6Ius4Bi/LA1xgkg=";
  };

  patches = [
    # https://github.com/bitprophet/pytest-relaxed/issues/28
    # https://github.com/bitprophet/pytest-relaxed/pull/29
    ./fix-oldstyle-hookimpl-setup.patch
  ];

  buildInputs = [ pytest ];

  propagatedBuildInputs = [ decorator ];

  nativeCheckInputs = [
    invoke
    pytestCheckHook
  ];

  enabledTestPaths = [ "tests" ];

  disabledTests = [
    "test_skips_pytest_fixtures"
  ];

  pythonImportsCheck = [ "pytest_relaxed" ];

  meta = {
    homepage = "https://pytest-relaxed.readthedocs.io/";
    description = "Relaxed test discovery/organization for pytest";
    changelog = "https://github.com/bitprophet/pytest-relaxed/blob/${version}/docs/changelog.rst";
    license = lib.licenses.bsd0;
    maintainers = [ ];
  };
}