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:
commit
7bf4340e73
@ -106,7 +106,6 @@ class Driver:
|
|||||||
with self.logger.subtest(name):
|
with self.logger.subtest(name):
|
||||||
try:
|
try:
|
||||||
yield
|
yield
|
||||||
return True
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.logger.error(f'Test "{name}" failed with error: "{e}"')
|
self.logger.error(f'Test "{name}" failed with error: "{e}"')
|
||||||
raise e
|
raise e
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
filelock,
|
filelock,
|
||||||
pytest-xdist,
|
pytest-xdist,
|
||||||
pytestCheckHook,
|
pytestCheckHook,
|
||||||
|
nixosTests,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
@ -118,6 +119,10 @@ buildPythonPackage rec {
|
|||||||
"mypyc/test/test_run.py"
|
"mypyc/test/test_run.py"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
inherit (nixosTests) nixos-test-driver;
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Optional static typing for Python";
|
description = "Optional static typing for Python";
|
||||||
homepage = "https://www.mypy-lang.org";
|
homepage = "https://www.mypy-lang.org";
|
||||||
|
Loading…
Reference in New Issue
Block a user