Merge pull request #317582 from mweinelt/test-driver-subtest-return-type

nixos/test-driver: fix return value of subtest function
This commit is contained in:
K900 2024-06-06 08:21:14 +03:00 committed by GitHub
commit 7bf4340e73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

@ -106,7 +106,6 @@ class Driver:
with self.logger.subtest(name):
try:
yield
return True
except Exception as e:
self.logger.error(f'Test "{name}" failed with error: "{e}"')
raise e

@ -26,6 +26,7 @@
filelock,
pytest-xdist,
pytestCheckHook,
nixosTests,
}:
buildPythonPackage rec {
@ -118,6 +119,10 @@ buildPythonPackage rec {
"mypyc/test/test_run.py"
];
passthru.tests = {
inherit (nixosTests) nixos-test-driver;
};
meta = with lib; {
description = "Optional static typing for Python";
homepage = "https://www.mypy-lang.org";