summary refs log tree commit diff
diff options
context:
space:
mode:
authorValentin Gagarin <valentin.gagarin@tweag.io>2022-08-03 11:08:00 +0200
committerGitHub <noreply@github.com>2022-08-03 11:08:00 +0200
commit246cce5dc0d4b63d88ce1ca025e689f9eaf76e8f (patch)
treec46e683257845fe644f99bf8366fb57830252059
parentbc7ff29bdfb316fe52b519cef57ab6171443b984 (diff)
parent7b0abced8df1276663e978c31e80f941c8de6417 (diff)
Merge pull request #183761 from leungbk/manual-typos
manual: fix typos
-rw-r--r--.git-blame-ignore-revs3
-rw-r--r--nixos/doc/manual/development/writing-nixos-tests.section.md34
-rw-r--r--nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml15
3 files changed, 25 insertions, 27 deletions
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
index c34d5b88536be..15be142ef0365 100644
--- a/.git-blame-ignore-revs
+++ b/.git-blame-ignore-revs
@@ -28,6 +28,9 @@
 # nixos/modules/rename: Sort alphabetically
 1f71224fe86605ef4cd23ed327b3da7882dad382
 
+# manual: fix typos
+feddd5e7f8c6f8167b48a077fa2a5394dc008999
+
 # nixos: fix module paths in rename.nix
 d08ede042b74b8199dc748323768227b88efcf7c
 
diff --git a/nixos/doc/manual/development/writing-nixos-tests.section.md b/nixos/doc/manual/development/writing-nixos-tests.section.md
index da965ce09e369..6934bb0face76 100644
--- a/nixos/doc/manual/development/writing-nixos-tests.section.md
+++ b/nixos/doc/manual/development/writing-nixos-tests.section.md
@@ -347,7 +347,7 @@ import ./make-test-python.nix {
 
 ## 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:
+To fail tests early when certain invariants 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:
 
 ```py
 @polling_condition
@@ -369,29 +369,29 @@ with foo_running:
 :
     specifies how often the condition should be polled:
 
-    ```py
-    @polling_condition(seconds_interval=10)
-    def foo_running():
-        machine.succeed("pgrep -x foo")
-    ```
+```py
+@polling_condition(seconds_interval=10)
+def foo_running():
+    machine.succeed("pgrep -x foo")
+```
 
 `description`
 
 :
     is used in the log when the condition is checked. If this is not provided, the description is pulled from the docstring of the function. These two are therefore equivalent:
 
-    ```py
-    @polling_condition
-    def foo_running():
-        "check that foo is running"
-        machine.succeed("pgrep -x foo")
-    ```
+```py
+@polling_condition
+def foo_running():
+    "check that foo is running"
+    machine.succeed("pgrep -x foo")
+```
 
-    ```py
-    @polling_condition(description="check that foo is running")
-    def foo_running():
-        machine.succeed("pgrep -x foo")
-    ```
+```py
+@polling_condition(description="check that foo is running")
+def foo_running():
+    machine.succeed("pgrep -x foo")
+```
 
 ## Adding Python packages to the test script {#ssec-python-packages-in-test-script}
 
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 7e4af03829067..d6f4f61c0645b 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
@@ -607,7 +607,7 @@ import ./make-test-python.nix {
   <section xml:id="ssec-failing-tests-early">
     <title>Failing tests early</title>
     <para>
-      To fail tests early when certain invariables are no longer met
+      To fail tests early when certain invariants are no longer met
       (instead of waiting for the build to time out), the decorator
       <literal>polling_condition</literal> is provided. For example, if
       we are testing a program <literal>foo</literal> that should not
@@ -635,12 +635,10 @@ with foo_running:
     <para>
       : specifies how often the condition should be polled:
     </para>
-    <programlisting>
-```py
+    <programlisting language="python">
 @polling_condition(seconds_interval=10)
 def foo_running():
     machine.succeed(&quot;pgrep -x foo&quot;)
-```
 </programlisting>
     <para>
       <literal>description</literal>
@@ -650,19 +648,16 @@ def foo_running():
       provided, the description is pulled from the docstring of the
       function. These two are therefore equivalent:
     </para>
-    <programlisting>
-```py
+    <programlisting language="python">
 @polling_condition
 def foo_running():
     &quot;check that foo is running&quot;
     machine.succeed(&quot;pgrep -x foo&quot;)
-```
-
-```py
+</programlisting>
+    <programlisting language="python">
 @polling_condition(description=&quot;check that foo is running&quot;)
 def foo_running():
     machine.succeed(&quot;pgrep -x foo&quot;)
-```
 </programlisting>
   </section>
   <section xml:id="ssec-python-packages-in-test-script">