作者:brucegogo03 | 来源:互联网 | 2023-05-17 20:51
IhaveaDjangoprojectwithacoupleofapps-allofthemwith100%coverageunittests.AndnowI
I have a Django project with a couple of apps - all of them with 100% coverage unit tests. And now I started documenting the whole thing in a new directory using ReST and Sphinx. I create the html files using the normal approach: make html
.
我有一个带有几个应用程序的Django项目 - 所有这些项目都有100%的覆盖率单元测试。现在我开始使用ReST和Sphinx在一个新目录中记录整个事情。我使用常规方法创建html文件:make html。
Since there are a couple of code snippets in these ReST files, I want to make sure that these snippets stay valid over time. So what is a good way to test these ReST files, so I get an error if some API changes made such a snippet invalid? I guess there have to be some changes in conf.py?
由于这些ReST文件中有几个代码段,因此我希望确保这些代码段随着时间的推移保持有效。那么测试这些ReST文件的好方法是什么,所以如果某些API更改导致这样的代码段无效,我会收到错误消息?我猜conf.py必须有一些变化吗?
1 个解决方案