You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can get the bytes read before timeout by expecting a ``pexpect.TIMEOUT`` object
57
+
You can get the bytes read before timeout by expecting a :obj:`pexpect.TIMEOUT` object.
58
58
59
59
.. code:: python
60
60
@@ -74,7 +74,7 @@ You can get the bytes read before timeout by expecting a ``pexpect.TIMEOUT`` obj
74
74
res = dut.expect(pexpect.TIMEOUT, timeout=3)
75
75
assert res ==b'11'
76
76
77
-
You can also get all bytes in the pexpect process buffer by expecting a ``pexpect.EOF`` object.
77
+
You can also get all bytes in the pexpect process buffer by expecting a :obj:`pexpect.EOF` object.
78
78
79
79
.. code:: python
80
80
@@ -92,7 +92,7 @@ You can also get all bytes in the pexpect process buffer by expecting a ``pexpec
92
92
93
93
.. note::
94
94
95
-
The pexpect process would only read from the process into the buffer when running expecting functions. If you're expecting ``pexpect.EOF`` as the first statement, it would return an empty byte string
95
+
The pexpect process would only read from the process into the buffer when running expecting functions. If you're expecting :obj:`pexpect.EOF` as the first statement, it would return an empty byte string
96
96
97
97
.. code:: python
98
98
@@ -108,7 +108,7 @@ You can also get all bytes in the pexpect process buffer by expecting a ``pexpec
108
108
res = dut.expect(pexpect.EOF, timeout=None)
109
109
assert res ==b""
110
110
111
-
What's more, argument `pattern` could be a list of all supported types.
111
+
What's more, argument ``pattern`` could be a list of all supported types.
112
112
113
113
.. code:: python
114
114
@@ -128,15 +128,15 @@ What's more, argument `pattern` could be a list of all supported types.
128
128
for _ inrange(4):
129
129
dut.expect(pattern_list)
130
130
131
-
If you set ``expect_all`` to ``True``, the ``expect()`` function would return with a list of returned values of each item.
131
+
If you set ``expect_all`` to ``True``, the :func:`~pytest_embedded.dut.Dut.expect` function would return with a list of returned values of each item.
132
132
133
133
***********************************************
134
134
:func:`~pytest_embedded.dut.Dut.expect_exact`
135
135
***********************************************
136
136
137
-
``pattern`` can be ``str`` or ``bytes``.
137
+
``pattern`` can be :obj:`str` or :obj:`bytes`.
138
138
139
-
If the pattern is ``str``, would convert to ``bytes`` and then run the function.
139
+
If the pattern is :obj:`str`, would convert to :obj:`bytes` and then run the function.
140
140
141
141
.. code:: python
142
142
@@ -146,7 +146,7 @@ If the pattern is ``str``, would convert to ``bytes`` and then run the function.
146
146
dut.expect_exact('this would')
147
147
dut.expect_exact(b'be redirected')
148
148
149
-
Same as ``expect(pattern, **kwargs)``, argument ``pattern`` could be a list of all supported types.
149
+
Same as :func:`~pytest_embedded.dut.Dut.expect` function, argument ``pattern`` could be a list of all supported types.
150
150
151
151
.. code:: python
152
152
@@ -169,7 +169,7 @@ Same as ``expect(pattern, **kwargs)``, argument ``pattern`` could be a list of a
169
169
170
170
This function would parse the output as the unity output. The default value of ``timeout`` is 60 seconds.
171
171
172
-
When the test script ends, the DUT object would raise ``AssertionError`` if any unity test case’s result is “FAIL”.
172
+
When the test script ends, the DUT object would raise :obj:`AssertionError` if any unity test case’s result is “FAIL”.
173
173
174
174
What’s more, it would dump the junit report under a temp folder and would combine the junit report into the main one if you use ``pytest --junitxml`` feature.
0 commit comments