diff --git a/pkgs/development/python-modules/kafka-python/default.nix b/pkgs/development/python-modules/kafka-python/default.nix index 868054251bc2..f5392202d4da 100644 --- a/pkgs/development/python-modules/kafka-python/default.nix +++ b/pkgs/development/python-modules/kafka-python/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, tox }: +{ stdenv, buildPythonPackage, fetchPypi, pytest, six, mock }: buildPythonPackage rec { name = "${pname}-${version}"; @@ -10,7 +10,16 @@ buildPythonPackage rec { sha256 = "19m9fdckxqngrgh0www7g8rgi7z0kq13wkhcqy1r8aa4sxad0f5j"; }; - buildInputs = [ tox ]; + checkInputs = [ pytest six mock ]; + + checkPhase = '' + py.test + ''; + + # Upstream uses tox but we don't on Nix. Running tests manually produces however + # from . import unittest + # E ImportError: cannot import name 'unittest' + doCheck = false; meta = with stdenv.lib; { description = "Pure Python client for Apache Kafka";