... | @@ -23,7 +23,7 @@ Python中的文档测试与类型标注 |
... | @@ -23,7 +23,7 @@ Python中的文档测试与类型标注 |
|
|
|
|
|
## `doctest`模块使用
|
|
## `doctest`模块使用
|
|
### `testmod()`方法
|
|
### `testmod()`方法
|
|
- 见`doctest_example.py`
|
|
- 见[doctest_example.py](doctest_example.py)
|
|
|
|
|
|
### `testfile()`方法
|
|
### `testfile()`方法
|
|
- 见`doctest_example.py`
|
|
- 见`doctest_example.py`
|
... | @@ -107,5 +107,4 @@ Python中的文档测试与类型标注 |
... | @@ -107,5 +107,4 @@ Python中的文档测试与类型标注 |
|
|
|
|
|
# 参考
|
|
# 参考
|
|
- [doctest --- 测试交互性的Python示例](https://docs.python.org/zh-cn/3.7/library/doctest.html)
|
|
- [doctest --- 测试交互性的Python示例](https://docs.python.org/zh-cn/3.7/library/doctest.html)
|
|
- [typing --- 类型标注支持](https://docs.python.org/zh-cn/3.7/library/typing.html)
|
|
- [typing --- 类型标注支持](https://docs.python.org/zh-cn/3.7/library/typing.html) |
|
|
|
\ No newline at end of file |