Hi Chris, Am Samstag, 7. November 2009 11:40:11 schrieb Chris Withers: > What is a WIP-version? A Work in progress version ;) That version is far from perfect and I just wanted to get general feedback on the idea.
> Have you looked at Manuel?
No, not yet. Thanks for the hint.
>From a first glance there is some functionality I was looking for (running the
documentation as testsuites to embed them in continuous testing utilities like
bitten).
The syntax I realized is more testsuite centric. For example a testsuite in
your documentation will look like this:
-----------8<--------------------------------
.. fixture:: simple_fixture
>>> a = 5 # Assign a variable.
>>> if a != 10: raise ValueError('w00t? I can\'t multiply!')
.. test:: testcase_with_fixture
:fixtures: simple_fixture
>>> a *= 2
This test doesn't fail because ``a`` has been assigned in the setup code.
Also take a look at the teardown code. As that is a doctest too, failures
will be reported as they would in a normal unittest.
------------------------>8--------------------
Note that the above two paragraphs are inlined documentation for the testcase.
> Why are you looking for html output?
This will result in html output as in the attached screenshot. I hope that the
integration of testsuite in your documentation will lead to uncryptic and
understandable testcode as I've seen it in my own and other projects ;-)
Also note that each testcase is run in its own environment to prevent
aftereffects. I know that this can be done with doctest blocks as well, but
they don't integrate well with testsuites as far as I know.
So, do you think that there's the need for something like this?
Regards,
Ontje
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---
<<attachment: sphinxtest.png>>
