From c4ab252be997f32536a18bc6eb13ede98eaede79 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 13 Jan 2021 13:53:47 +0100 Subject: [PATCH] python3Packages.factory_boy: enable tests --- .../python-modules/factory_boy/default.nix | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/factory_boy/default.nix b/pkgs/development/python-modules/factory_boy/default.nix index f81245b69829..17893967d9b8 100644 --- a/pkgs/development/python-modules/factory_boy/default.nix +++ b/pkgs/development/python-modules/factory_boy/default.nix @@ -1,10 +1,13 @@ { lib , buildPythonPackage -, fetchPypi -, isPy27 +, django , faker -, python -, ipaddress +, fetchPypi +, flask +, flask_sqlalchemy +, mongoengine +, pytestCheckHook +, sqlalchemy }: buildPythonPackage rec { @@ -16,10 +19,20 @@ buildPythonPackage rec { sha256 = "0nsw2mdjk8sqds3qsix4cf19ws6i0fak79349pw2581ryc7w0720"; }; - propagatedBuildInputs = [ faker ] ++ lib.optionals isPy27 [ ipaddress ]; + propagatedBuildInputs = [ faker ]; - # tests not included with pypi release - doCheck = false; + checkInputs = [ + django + flask + flask_sqlalchemy + mongoengine + pytestCheckHook + sqlalchemy + ]; + + # Checks for MongoDB requires an a running DB + disabledTests = [ "MongoEngineTestCase" ]; + pythonImportsCheck = [ "factory" ]; meta = with lib; { description = "A Python package to create factories for complex objects";