diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2022-06-03 14:19:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-03 14:19:21 +0200 |
commit | de3e423178d6263ded7cf55d98778c829034ae34 (patch) | |
tree | 2055cad2ab77bfd7e60c672834759b3ac7a5740b /nixos/doc | |
parent | e6b16431e14b6b9ab909eea254066f63711d6777 (diff) | |
parent | fd4ebd89909f181b2f88be5ba44a4eb7b6a903ab (diff) |
Merge pull request #171280 from m1-s/fix_mypy2
nixos/test-driver: Typecheck TestScript
Diffstat (limited to 'nixos/doc')
-rw-r--r-- | nixos/doc/manual/development/writing-nixos-tests.section.md | 13 | ||||
-rw-r--r-- | nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/nixos/doc/manual/development/writing-nixos-tests.section.md b/nixos/doc/manual/development/writing-nixos-tests.section.md index e5ee1cb01ff16..583b8f712b412 100644 --- a/nixos/doc/manual/development/writing-nixos-tests.section.md +++ b/nixos/doc/manual/development/writing-nixos-tests.section.md @@ -332,6 +332,19 @@ repository): ''; ``` +Similarly, the type checking of test scripts can be disabled in the following +way: + +```nix +import ./make-test-python.nix { + skipTypeCheck = true; + nodes.machine = + { config, pkgs, ... }: + { configuration… + }; +} +``` + ## Failing tests early {#ssec-failing-tests-early} To fail tests early when certain invariables are no longer met (instead of waiting for the build to time out), the decorator `polling_condition` is provided. For example, if we are testing a program `foo` that should not quit after being started, we might write the following: diff --git a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml index 7ce3e4cb29065..79df3b9c3764a 100644 --- a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml +++ b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml @@ -590,6 +590,19 @@ import ./make-test-python.nix { # fmt: on ''; </programlisting> + <para> + Similarly, the type checking of test scripts can be disabled in + the following way: + </para> + <programlisting language="bash"> +import ./make-test-python.nix { + skipTypeCheck = true; + nodes.machine = + { config, pkgs, ... }: + { configuration… + }; +} +</programlisting> </section> <section xml:id="ssec-failing-tests-early"> <title>Failing tests early</title> |