mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-06 01:31:39 -05:00
test: remove dead code from test
This commit is contained in:
parent
4f04d996d4
commit
abae7c55ab
1 changed files with 4 additions and 22 deletions
|
@ -1,9 +1,4 @@
|
|||
{ lib
|
||||
, poetry2nix
|
||||
, python3
|
||||
, runCommand
|
||||
,
|
||||
}:
|
||||
{ lib, poetry2nix, python3, stdenv }:
|
||||
let
|
||||
args = {
|
||||
python = python3;
|
||||
|
@ -14,23 +9,10 @@ let
|
|||
app = poetry2nix.mkPoetryApplication args;
|
||||
url_nix_store = py.python.pkgs.de-core-news-sm.src;
|
||||
url_is_wheel = url_nix_store.isWheel or false;
|
||||
output =
|
||||
runCommand "app_eval"
|
||||
{ } ''
|
||||
"${app}/bin/test" >$out
|
||||
'';
|
||||
is_wheel_attr_test = x: lib.warnIf (!url_is_wheel)
|
||||
"url should resolve to have src with .isWheel, likely darwin only issue"
|
||||
is_wheel_attr_test = x: lib.warnIf (!stdenv.isLinux && !url_is_wheel)
|
||||
"url should resolve to have src with .isWheel"
|
||||
x;
|
||||
is_wheel_test = x: assert lib.strings.hasSuffix "whl" url_nix_store; x;
|
||||
# HACK: CI fails because https://github.com/nix-community/poetry2nix/pull/1109
|
||||
# seems to want libcuda to be installed/managed separately, run it on impure
|
||||
# shell and we are all good.
|
||||
integration_run_test = x: assert (builtins.readFile output) == "Dies ist ein Testsatz.\n"; x;
|
||||
app_builds = x: assert lib.isDerivation app; x;
|
||||
|
||||
constraintOutput = x: lib.pipe x [ is_wheel_attr_test is_wheel_test app_builds ];
|
||||
|
||||
in
|
||||
constraintOutput
|
||||
app
|
||||
lib.pipe app [ is_wheel_attr_test is_wheel_test app_builds ]
|
||||
|
|
Loading…
Add table
Reference in a new issue