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
Copy file name to clipboardExpand all lines: README.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
8
8
pytest-inline is a [pytest](<http://pytest.org>) plugin for writing inline tests.
9
9
10
-
Inline testing is a new granularity of testing that make it easier to check individual program statements. An inline test is a statement that allows to provide arbitrary inputs and test oracles for checking the immediately preceding statement that is not an inline test. Unlike unit tests that are usually placed in separate `test_*.py` files, inline tests are written together with the actual production code (and thus are easier to maintain).
10
+
Inline testing is a new granularity of testing that makes it easier to check individual program statements. An inline test is a statement that allows developers to provide arbitrary inputs and test oracles for checking the immediately preceding statement that is not an inline test. Unlike unit tests that are usually placed in separate `test_*.py` files, inline tests are written together with the actual production code (and thus are easier to maintain).
11
11
12
12
## Table of contents
13
13
@@ -19,13 +19,15 @@ Inline testing is a new granularity of testing that make it easier to check indi
19
19
6.[Citation](#Citation)
20
20
21
21
## Example
22
-
The regular expression (Line 5) in this code snippet checks if variable name matches a regex for a pattern that ends in a colon and has at least one digit
23
-
The inline test (Line 6) that we write for target statement (Line 5) consists of three parts:
22
+
The regular expression (Line 7) in this code snippet checks if variable name matches a regex for a pattern that ends in a colon and has at least one digit
23
+
The inline test (Line 8) that we write for target statement (Line 7) consists of three parts:
24
24
- Declaration with itest() constructor
25
25
- Assigning inputs with given() function calls
26
26
- Specifying test oracles with check_*() function calls
@@ -87,7 +89,7 @@ Use ``pytest {filename}`` to run all inline tests in a Python file.
87
89
- given(variable, value):
88
90
Assign the value to the variable.
89
91
90
-
Note that any number of given statements can be added. Below is a small example of this functionality. Additionally, the first given call must proceed either an itest() declaration ora assume() call if it is added.
92
+
Note that any number of given statements can be added. Below is a small example of this functionality. Additionally, the first given call must proceed either an itest() declaration oran assume() call if it is added.
0 commit comments