summaryrefslogtreecommitdiffstats
path: root/pkgs/development/tools/database
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2019-01-31 15:43:35 -0500
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2019-01-31 15:43:35 -0500
commitf3fe429d445aecfc7cc3f80f1fed01e77012f668 (patch)
tree3801002abbfd45bde7ab5c207da8b336a7027e64 /pkgs/development/tools/database
parent2f0dbb8bdad4c2a09b121d63e87661644e4a8428 (diff)
litecli: fix tests
Diffstat (limited to 'pkgs/development/tools/database')
-rw-r--r--pkgs/development/tools/database/litecli/default.nix18
1 files changed, 16 insertions, 2 deletions
diff --git a/pkgs/development/tools/database/litecli/default.nix b/pkgs/development/tools/database/litecli/default.nix
index c878aa1c905c..cbf1af440575 100644
--- a/pkgs/development/tools/database/litecli/default.nix
+++ b/pkgs/development/tools/database/litecli/default.nix
@@ -13,6 +13,12 @@ python3Packages.buildPythonApplication rec {
sha256 = "0s5a6r5q09144cc5169snwis5i2jrh3z2g4mw9wi2fsjxyhgpwq5";
};
+ # fixes tests https://github.com/dbcli/litecli/pull/53
+ postPatch = ''
+ substituteInPlace litecli/main.py \
+ --replace 'except FileNotFoundError:' 'except (FileNotFoundError, OSError):'
+ '';
+
propagatedBuildInputs = with python3Packages; [
cli-helpers
click
@@ -22,8 +28,16 @@ python3Packages.buildPythonApplication rec {
sqlparse
];
- #Checks are failing due to missing TTY, which won't exist.
- doCheck = false;
+ checkInputs = with python3Packages; [
+ pytest
+ mock
+ ];
+
+ preCheck = ''
+ export XDG_CONFIG_HOME=$TMP
+ # add missing file
+ echo "litecli is awesome!" > tests/test.txt
+ '';
meta = with lib; {
description = "Command-line interface for SQLite";