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
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ Inline testing is a new granularity of testing that make it easier to check indi
21
21
## Example
22
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
23
The inline test (Line 6) that we write for target statement (Line 5) consists of three parts:
24
-
- Declaration with Here() constructor
24
+
- Declaration with itest() constructor
25
25
- Assigning inputs with given() function calls
26
26
- Specifying test oracles with check_*() function calls
@@ -87,12 +87,12 @@ Use ``pytest {filename}`` to run all inline tests in a Python file.
87
87
- given(variable, value):
88
88
Assign the value to the variable.
89
89
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 a Here() declaration or a assume() call if it is added.
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 or a assume() call if it is added.
91
91
92
92
```python {.line-numbers}
93
93
defmultiple_givens(a, c):
94
94
b = a + c
95
-
Here().given(a, 2).given(c, a +1).check_true(b ==5)
95
+
itest().given(a, 2).given(c, a +1).check_true(b ==5)
0 commit comments