sympy/sympy — pull request #908 by flacjacket (2011-12-30 00:38:53+00:00)
Title: Quantum printing tests

This pull gives full coverage of all the printing methods in the physics.quantum module, inspired as the first step in @Krastanov 's old pull #186 to rework the printing in the quantum module.

This first commit implements tests for all printing methods in the quantum module, which I checked with the coverage report. No changes are made to the printing methods, this is just to establish a baseline for verifying valid output capable of working in the ipython Qt console and html notebook. Note XFAIL tests show where there are errors in the printing methods.

Also in this pull is a fix for latex printing of AntiCommutator, which would give an invalid latex expression. The current implementation gives valid latex output which displays in the ipython html notebook, but I could not get the ipython Qt console to output the curly brackets.

I have a few decently large nested expressions which can display alright in the html notebook, but I may gradually add some depending on when this is merged. Any suggestions on these would be greatly welcomed.

I have a ipynb file that can be run to see the output from everything in the new tests rendered by the html notebook, which I put up on my google docs here [1]. I've tried to do something similar to this for the Qt console, but I haven't been able to get it working with either ``%run`` (can't get pylab output) or ``%loadpy`` (only gets output of first command), maybe if @ellisonbg knows a good way to do this.

[1] http://goo.gl/iSDaI