-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- F Added parse inputs from docs string
Co-Authored-By: Kevin Maes <kevin@kevinmaes.com> Co-Authored-By: 4dsherwood <4dsherwood@users.noreply.github.com> Co-Authored-By: blade290 <43077216+blade290@users.noreply.github.com> Co-Authored-By: Nitsan Avni <nitsanav@gmail.com> Co-Authored-By: Susan Fung <38925660+susanfung@users.noreply.github.com> Co-Authored-By: Nazee Hajebi <2491283+NazeeHajebi@users.noreply.github.com> Co-Authored-By: T. E. Green <78671457+Tegsy@users.noreply.github.com>
- Loading branch information
1 parent
a387954
commit 8b01b42
Showing
5 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from approvaltests.namer.inline_comparator import InlineComparator | ||
|
||
|
||
def parse_docstring(): | ||
lines = InlineComparator.get_test_method_doc_string().split("\n")[:-1] | ||
return [line.split("->")[0].strip() for line in lines ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
tests/approved_files/test_inline_approvals.test_docstring_parsing.approved.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
inputs | ||
|
||
0) 1 | ||
1) 2 | ||
2) Fizz | ||
3) 4 | ||
4) Buzz | ||
5) Fizz | ||
6) 7 | ||
7) 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters