summary refs log tree commit diff
path: root/pkgs/development/python-modules/asynctest/default.nix
blob: b38ce7c91ce1221da662f32c1620ddd82f774e50 (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
{ lib, buildPythonPackage, fetchPypi, pythonOlder, python }:

buildPythonPackage rec {
  pname = "asynctest";
  version = "0.12.4";

  disabled = pythonOlder "3.4";

  src = fetchPypi {
    inherit pname version;
    sha256 = "ade427a711d18016f35fb0c5d412f0ed63fb074a6084b67ff2dad48f50b0d6ca";
  };

  postPatch = ''
    # Skip failing test, probably caused by file system access
    substituteInPlace test/test_selector.py \
      --replace "test_events_watched_outside_test_are_ignored" "xtest_events_watched_outside_test_are_ignored"
  '';

  checkPhase = ''
    ${python.interpreter} -m unittest test
  '';

  meta = with lib; {
    description = "Enhance the standard unittest package with features for testing asyncio libraries";
    homepage = https://github.com/Martiusweb/asynctest;
    license = licenses.asl20;
    maintainers = with maintainers; [ dotlambda ];
  };
}