Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

litecli: fix tests

+16 -2
+16 -2
pkgs/development/tools/database/litecli/default.nix
··· 13 13 sha256 = "0s5a6r5q09144cc5169snwis5i2jrh3z2g4mw9wi2fsjxyhgpwq5"; 14 14 }; 15 15 16 + # fixes tests https://github.com/dbcli/litecli/pull/53 17 + postPatch = '' 18 + substituteInPlace litecli/main.py \ 19 + --replace 'except FileNotFoundError:' 'except (FileNotFoundError, OSError):' 20 + ''; 21 + 16 22 propagatedBuildInputs = with python3Packages; [ 17 23 cli-helpers 18 24 click ··· 22 28 sqlparse 23 29 ]; 24 30 25 - #Checks are failing due to missing TTY, which won't exist. 26 - doCheck = false; 31 + checkInputs = with python3Packages; [ 32 + pytest 33 + mock 34 + ]; 35 + 36 + preCheck = '' 37 + export XDG_CONFIG_HOME=$TMP 38 + # add missing file 39 + echo "litecli is awesome!" > tests/test.txt 40 + ''; 27 41 28 42 meta = with lib; { 29 43 description = "Command-line interface for SQLite";