From 6fe8ff983e26ae90bc66253df12ebb441a464af7 Mon Sep 17 00:00:00 2001 From: Austin Butler Date: Mon, 11 Apr 2022 18:56:47 +0000 Subject: [PATCH] python3Packages.apsw: fix tests, add gador as maintainer Signed-off-by: Florian Brandes Co-authored-by: Sandro --- .../python-modules/apsw/default.nix | 38 ++++--------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/pkgs/development/python-modules/apsw/default.nix b/pkgs/development/python-modules/apsw/default.nix index 8ff78f7ad63..dda3fe6a683 100644 --- a/pkgs/development/python-modules/apsw/default.nix +++ b/pkgs/development/python-modules/apsw/default.nix @@ -4,7 +4,7 @@ , fetchFromGitHub , sqlite , isPyPy -, pytestCheckHook +, python }: buildPythonPackage rec { @@ -25,37 +25,13 @@ buildPythonPackage rec { sqlite ]; - checkInputs = [ - pytestCheckHook - ]; - - # Works around the following error by dropping the call to that function - # def print_version_info(write=write): - # > write(" Python " + sys.executable + " " + str(sys.version_info) + "\n") - # E TypeError: 'module' object is not callable - preCheck = '' - sed -i '/print_version_info(write)/d' tests.py + # Project uses custom test setup to exclude some tests by default, so using pytest + # requires more maintenance + # https://github.com/rogerbinns/apsw/issues/335 + checkPhase = '' + ${python.interpreter} setup.py test ''; - pytestFlagsArray = [ - "tests.py" - ]; - - disabledTests = [ - "testCursor" - "testdb" - "testLargeObjects" - "testLoadExtension" - "testShell" - "testVFS" - "testVFSWithWAL" - ] ++ lib.optionals stdenv.isDarwin [ - # This is https://github.com/rogerbinns/apsw/issues/277 but - # because we use pytestCheckHook we need to blacklist the test - # manually - "testzzForkChecker" - ]; - pythonImportsCheck = [ "apsw" ]; @@ -64,6 +40,6 @@ buildPythonPackage rec { description = "A Python wrapper for the SQLite embedded relational database engine"; homepage = "https://github.com/rogerbinns/apsw"; license = licenses.zlib; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ gador ]; }; }