Thank you very much for the proposed patch.
Still, I don’t grasp what we gain by keeping doctest as is, specially if we add all those features.
After the patch is committed I understand that the only provided features by doctest are:
- Testing values without an explicit assert
- Testing exceptions without an explicit assert
- At least in theory, makes the comments (the scenario) more prominent
The first two features are provided by the assertEqual and assertRaises respectively. The latter, can be just python comments.
At the same time if I look at what is the cost of keep using rst I see:
- We need additional scripts to convert those rst into python code to have the checks pyflakes or flake8 provide. Your patch proposes what the tryton project needs, but every company and individual has its own workflows. I wouldn’t care for out of project needs if the benefits of doctest where huge but I don’t think so.
- We do not have syntax highlight. Again, the argument that it is just a tools issue may be ok for me if the benefit of the feature was huge but I don’t think so. If one wants syntax highlighting he needs to implement the tooling for heptapod, github, vim, vs code, etc. While we get them for free using standard python scripts.
- It forces all tests to add the ">>> " prefix and when you want multiple lines to add the "… ". I don’t know about others, but I need to write those prefixes for every single line of code. Maybe tools can automate part of that, but why would I want to create the tools if python scripts would essentially do the same job. Also, if I multiply that extra tooling cost for all developers here, is really all worth it?
- The argument that you’re very productive with rst is ok but I really don’t get how you’d be less productive with plain python scripts.
So, for me (and the rest of our team, and it seems for others too) it makes both writing and reading tests more complicated and also requires extra tooling. What are the real benefits?