Python wrapping: Give up on redirecting C stdout so that doctests can see it,

at least for the nonce. More thinking required, more study.

--HG--
extra : convert_revision : svn%3Aeff31bef-be4a-0410-a8fe-e47997df2690/trunk%40125
issue20
tibs 2009-02-22 19:40:13 +00:00
rodzic 8aad839cff
commit b705101f5e
2 zmienionych plików z 2 dodań i 30 usunięć

Wyświetl plik

@ -45,9 +45,9 @@ test: setup
.PHONY: clean
clean:
python Setup.py clean
-rm tstools/*.so
-rm -rf build/
.PHONY: distclean
distclean: clean
-rm tstools/*.c tstools/*.dep
-rm tstools/*.c

Wyświetl plik

@ -1,34 +1,6 @@
Some tests for the Python binding of the TS tools
=================================================
We'd like the tstools C messages to get captured by doctest, so we can see
them in our tests, so:
>>> import tstools
>>> tstools.setup_printing_for_doctest()
Printing redirected for doctest
>>> tstools.test_printing()
YY Message
YY Error
XX Message "Fred"
XX Error "Fred"
and again:
>>> tstools.test_printing()
YY Message
YY Error
XX Message "Fred"
XX Error "Fred"
and even:
>>> tstools.test_c_printing()
YY C Message
YY C Error
XX C Message Fred
XX C Error Fred
Elementary streams -- basic functionality
-----------------------------------------
In this context, we take an elementary stream to be MPEG-1, MPEG-2 or H.264