mirror of
https://github.com/fort-nix/nix-bitcoin.git
synced 2024-11-27 12:06:33 +03:00
1be924529d
The Python test driver now uses 'pyflakes'. Remove hacks that were needed for the 'black' linter.
26 lines
712 B
Nix
26 lines
712 B
Nix
pkgs:
|
|
let
|
|
pythonTesting = import "${toString pkgs.path}/nixos/lib/testing-python.nix" {
|
|
system = pkgs.stdenv.hostPlatform.system;
|
|
inherit pkgs;
|
|
};
|
|
in
|
|
|
|
args:
|
|
let
|
|
test = pythonTesting.makeTest args;
|
|
|
|
# 1. Save test logging output
|
|
# 2. Add link to driver so that a gcroot to a test prevents the driver from
|
|
# being garbage-collected
|
|
fixedTest = test.overrideAttrs (_: {
|
|
# See `runTests` in nixpkgs/nixos/lib/testing-python.nix for the original definition of `buildCommand`
|
|
buildCommand = ''
|
|
mkdir $out
|
|
LOGFILE=$out/output.xml tests='exec(os.environ["testScript"])' ${test.driver}/bin/nixos-test-driver
|
|
ln -s ${test.driver} $out/driver
|
|
'';
|
|
});
|
|
in
|
|
fixedTest
|