-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add unit tests to test current output of indented docsrings for googl…
…e, pydocmd and sphinx processors (see #259)
- Loading branch information
1 parent
16b3345
commit b15127e
Showing
5 changed files
with
163 additions
and
4 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
59 changes: 59 additions & 0 deletions
59
test/testcases/renderers/markdown/indented_docstring_google.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,59 @@ | ||
---- | ||
renderer: | ||
insert_header_anchors: false | ||
render_module_header: false | ||
processor: | ||
type: google | ||
---- | ||
def a(v: int) -> None: | ||
""" This is a docstring. | ||
|
||
Args: | ||
v: The value. | ||
Return: | ||
None | ||
|
||
Example: | ||
|
||
>>> import os | ||
>>> os.getenv('PYTHON') | ||
'python' | ||
|
||
Or check out this code: | ||
|
||
```py | ||
def foo(): | ||
print("Hello, World!") | ||
``` | ||
""" | ||
---- | ||
#### a | ||
|
||
```python | ||
def a(v: int) -> None | ||
``` | ||
|
||
This is a docstring. | ||
|
||
**Arguments**: | ||
|
||
- `v` - The value. | ||
|
||
**Returns**: | ||
|
||
None | ||
|
||
|
||
**Example**: | ||
|
||
|
||
>>> import os | ||
>>> os.getenv('PYTHON') | ||
'python' | ||
|
||
Or check out this code: | ||
|
||
```py | ||
def foo(): | ||
print("Hello, World!") | ||
``` |
44 changes: 44 additions & 0 deletions
44
test/testcases/renderers/markdown/indented_docstring_pydocmd.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,44 @@ | ||
---- | ||
renderer: | ||
insert_header_anchors: false | ||
render_module_header: false | ||
processor: | ||
type: pydocmd | ||
---- | ||
def a(): | ||
""" This is a docstring. | ||
|
||
Example: | ||
|
||
>>> import os | ||
>>> os.getenv('PYTHON') | ||
'python' | ||
|
||
Or check out this code: | ||
|
||
```py | ||
def foo(): | ||
print("Hello, World!") | ||
``` | ||
""" | ||
---- | ||
#### a | ||
|
||
```python | ||
def a() | ||
``` | ||
|
||
This is a docstring. | ||
|
||
Example: | ||
|
||
>>> import os | ||
>>> os.getenv('PYTHON') | ||
'python' | ||
|
||
Or check out this code: | ||
|
||
```py | ||
def foo(): | ||
print("Hello, World!") | ||
``` |
54 changes: 54 additions & 0 deletions
54
test/testcases/renderers/markdown/indented_docstring_sphinx.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,54 @@ | ||
---- | ||
renderer: | ||
insert_header_anchors: false | ||
render_module_header: false | ||
processor: | ||
type: sphinx | ||
---- | ||
def a(v: int) -> None: | ||
""" This is a docstring. | ||
|
||
:param v: The value. | ||
:return: None | ||
|
||
Example: | ||
|
||
>>> import os | ||
>>> os.getenv('PYTHON') | ||
'python' | ||
|
||
Or check out this code: | ||
|
||
```py | ||
def foo(): | ||
print("Hello, World!") | ||
``` | ||
""" | ||
---- | ||
#### a | ||
|
||
```python | ||
def a(v: int) -> None | ||
``` | ||
|
||
This is a docstring. | ||
|
||
**Arguments**: | ||
|
||
- `v`: The value. | ||
|
||
**Returns**: | ||
|
||
None | ||
Example: | ||
|
||
>>> import os | ||
>>> os.getenv('PYTHON') | ||
'python' | ||
|
||
Or check out this code: | ||
|
||
```py | ||
def foo(): | ||
print("Hello, World!") | ||
``` |