nicoo 244229a8b6 python3Packages.bork: add test using testers.runCommand
This will serve as a “real-world” example, running tests requiring network.
2024-08-08 15:29:15 +00:00

29 lines
465 B
Nix

{
testers,
bork,
cacert,
git,
pytest,
}:
{
# a.k.a. `tests.testers.runCommand.bork`
pytest-network = testers.runCommand {
name = "bork-pytest-network";
nativeBuildInputs = [
bork
cacert
git
pytest
];
script = ''
# Copy the source tree over, and make it writeable
cp -r ${bork.src} bork/
find -type d -exec chmod 0755 '{}' '+'
pytest -v -m network bork/
touch $out
'';
};
}