Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing python 3 pretty printing tests #1517

Merged
merged 7 commits into from
Sep 12, 2012
Merged

Failing python 3 pretty printing tests #1517

merged 7 commits into from
Sep 12, 2012

Conversation

jrioux
Copy link
Member

@jrioux jrioux commented Aug 28, 2012

Pretty printing tests were failing on my machine under python 3. It's an encoding issue with the test runner. I fixed the test runner and now the tests pass.

@jrioux
Copy link
Member Author

jrioux commented Aug 28, 2012

I made some trivial docstring fixes so that I can run the bot on something to start with.

@smichr
Copy link
Member

smichr commented Aug 28, 2012

Looks good...I suppose you want to wait for the bot tests before committing this?

@jrioux
Copy link
Member Author

jrioux commented Aug 28, 2012

I'm putting this here so that I can run the bot on something, and add commits until I get it right.

@jrioux
Copy link
Member Author

jrioux commented Aug 28, 2012

SymPy Bot Summary: 🔴 Failed after merging jrioux/tests (c65e8df2948f5a34d6e3e0dffc4f742fb59db157) into master (161c963).
@jrioux: Please fix the test failures.
🔴 Python 3.2.1-final-0: fail
Test command: bin/test test_pretty test_printing

@jrioux jrioux mentioned this pull request Aug 28, 2012
@travisbot
Copy link

This pull request passes (merged c65e8df2 into 161c963).

@jrioux
Copy link
Member Author

jrioux commented Aug 28, 2012

SymPy Bot Summary: 🔴 Failed after merging jrioux/tests (ca6f775c7e6c89f35c2de36c7c650fdd9fdabd58) into master (161c963).
@jrioux: Please fix the test failures.
🔴 Python 3.2.1-final-0: fail
Test command: bin/test test_pretty test_printing

@travisbot
Copy link

This pull request fails (merged ca6f775c into 161c963).

@jrioux
Copy link
Member Author

jrioux commented Aug 28, 2012

SymPy Bot Summary: ✳️ Passed after merging jrioux/tests (5d4920c98ddce646a9411f21ff78acf9f013ecc4) into master (161c963).
✳️ Python 3.2.1-final-0: pass
Test command: bin/test test_pretty test_printing

@travisbot
Copy link

This pull request passes (merged 5d4920c9 into 161c963).

@jrioux
Copy link
Member Author

jrioux commented Aug 28, 2012

SymPy Bot Summary: 🔴 Failed after merging jrioux/tests (9c714ae764faceefaf825898453a436eb328f3c7) into master (161c963).
@jrioux: Please fix the test failures.
🔴 Python 3.2.1-final-0: fail
Test command: bin/test test_pretty test_printing

@travisbot
Copy link

This pull request passes (merged 9c714ae7 into 161c963).

@jrioux
Copy link
Member Author

jrioux commented Aug 28, 2012

So, I seem to have found the fix in commit 5d4920c. I reverted the fix so that the bot and especially a change I made can be tested: https://github.com/sympy/sympy-bot/pull/130

@asmeurer
Copy link
Member

Does this need to go in the release branch?

@jrioux
Copy link
Member Author

jrioux commented Aug 28, 2012

SymPy Bot Summary: 🔴 Failed after merging jrioux/tests (9c714ae764faceefaf825898453a436eb328f3c7) into master (161c963).
@jrioux: Please fix the test failures.
🔴 Python 3.2.1-final-0: fail

@jrioux
Copy link
Member Author

jrioux commented Aug 28, 2012

SymPy Bot Summary: 🔴 Failed after merging jrioux/tests (9c714ae764faceefaf825898453a436eb328f3c7) into master (161c963).
@jrioux: Please fix the test failures.
✳️ Python 2.7.2-final-0: pass
🔴 Python 3.2.1-final-0: fail

@jrioux
Copy link
Member Author

jrioux commented Aug 28, 2012

This needs more testing.

@jrioux
Copy link
Member Author

jrioux commented Aug 29, 2012

SymPy Bot Summary: 🔴 Failed after merging jrioux/tests (9c714ae764faceefaf825898453a436eb328f3c7) into master (161c963).
@jrioux: Please fix the test failures.
✳️ Python 2.7.2-final-0: pass
🔴 Python 3.2.1-final-0: fail

@travisbot
Copy link

This pull request passes (merged 32332fe0 into 161c963).

@jrioux
Copy link
Member Author

jrioux commented Aug 29, 2012

SymPy Bot Summary: ✳️ Passed after merging jrioux/tests (32332fe0f45e7fc6c7938a435255703245e87bc6) into master (161c963).
✳️ Python 2.7.2-final-0: pass
✳️ Python 3.2.1-final-0: pass

@jrioux
Copy link
Member Author

jrioux commented Aug 29, 2012

SymPy Bot Summary: ✳️ Passed after merging jrioux/tests (32332fe0f45e7fc6c7938a435255703245e87bc6) into master (161c963).
✳️Sphinx 1.1.3: pass

@jrioux
Copy link
Member Author

jrioux commented Aug 29, 2012

This is ready to go.

@vperic
Copy link
Contributor

vperic commented Aug 29, 2012

Ok, checked all the commits, it all looks good, I'm +1 to merging. Lets wait a day or two to see if someone else wants to take a look; if no one merges it by then I will.

@asmeurer I guess this should go in the release, it fixes failures in py3k. If you want to be more conservative, you can drop the docstring commits and the two about use2to3, leaving just the two fixing the failures. @jrioux, any thoughts?

@jrioux
Copy link
Member Author

jrioux commented Aug 29, 2012

Let's get more people running their python3 bots against this PR.

@vperic
Copy link
Contributor

vperic commented Aug 29, 2012

Good point. I'll try to do so when I can, but not before the weekend
(and likely not even then).

On 8/29/12, Julien Rioux notifications@github.com wrote:

Let's get more people running their python3 bots against this PR.


Reply to this email directly or view it on GitHub:
#1517 (comment)

Vladimir Perić

@smichr
Copy link
Member

smichr commented Aug 29, 2012

It all still looks good to me but I defer to Aaron to decide where this should be merged (master or 072).

@asmeurer
Copy link
Member

If you want this to go in 0.7.2, please rebase it over that branch (you may need to use the --onto flag to rebase to move just these commits).

@jrioux
Copy link
Member Author

jrioux commented Aug 30, 2012

At the moment I have no idea whether these fixes work for others as well as they do for me, so I wouldn't push to 0.7.2 without any more testing.

@asmeurer
Copy link
Member

SymPy Bot Summary: 🔴 Failed after merging jrioux/tests (32332fe0f45e7fc6c7938a435255703245e87bc6) into master (d208118).
@jrioux: Please fix the test failures.
✳️ Python 2.5.0-final-0: pass
✳️ Python 2.6.6-final-0: pass
✳️ Python 2.7.2-final-0: pass
✳️ Python 2.6.8-final-0: pass
✳️ Python 2.7.3-final-0: pass
🔴 PyPy 1.9.0-final-0; 2.7.2-final-42: fail
✳️ Python 3.2.2-final-0: pass
✳️ Python 3.3.0-beta-2: pass
✳️ Python 3.2.3-final-0: pass
✳️ Python 3.3.0-beta-2: pass
✳️Sphinx 1.1.3: pass

@jrioux
Copy link
Member Author

jrioux commented Sep 1, 2012

That looks good. Any more testers?

@asmeurer
Copy link
Member

asmeurer commented Sep 2, 2012

I'm trying to figure out how to get internet to my laptop with Windows (as apparently that was where the issue arose?). If I can do it, I'll run the tests there. Or we can just merge it now and fix things later if they come up (definitely we want to test Windows before we do the final release).

Check that the encoding used by stdout supports the characters that
we are about to print. If not, replace the problematic characters
by their backslash escaped form. This avoids the test runner from
exiting early due to an UnicodeEncodeError while printing out test
failures, from these files in particular:

sympy/printing/pretty/tests/test_pretty.py
sympy/physics/quantum/tests/test_printing.py
In python 3, printing tests fail if stdout uses an encoding
different from utf8. The test runner is modified to take the
encoding of stdout into account.
Keep a record of destination files and use it against the list
of files in the destination folder, to identify and remove any
lingering files.

Fixes issue 3344.
@jrioux
Copy link
Member Author

jrioux commented Sep 3, 2012

The issue arose on linux with ISO 8859-1 as default encoding. Testing on windows would be nice, if you can manage it.

@jrioux
Copy link
Member Author

jrioux commented Sep 3, 2012

I've rebased this so that it can be merged into either master or 0.7.2 as you see fit.

@travisbot
Copy link

This pull request passes (merged 5c672d9 into d208118).

@jrioux
Copy link
Member Author

jrioux commented Sep 5, 2012

SymPy Bot Summary: ✳️ Passed after merging jrioux/tests (5c672d9) into master (d208118).
✳️ Python 2.7.2-final-0: pass
✳️ Python 3.2.1-final-0: pass
✳️Sphinx 1.1.3: pass
Docs build command: make clean && make html-errors && make clean && make latex && cd _build/latex && xelatex

@jrioux
Copy link
Member Author

jrioux commented Sep 12, 2012

It would be nice to have this in so that I can properly run the python 3 tests.

asmeurer added a commit that referenced this pull request Sep 12, 2012
Failing python 3 pretty printing tests
@asmeurer asmeurer merged commit c49dca1 into sympy:master Sep 12, 2012
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 5c672d9 on jrioux:tests into * on sympy:master*.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants