The issue report here seemed to request some test. This pull request should provide it.
git pull https://github.com/mrshu/sympy and-printing-test
Or view, comment on, or merge it at:
https://github.com/sympy/sympy/pull/1704
—
Reply to this email directly or view it on GitHub.
As you can see from the Travis tests, there are issues here.
As it turned out, I was testing a wrong function =)
Looks OK.
SymPy Bot Summary: Failed after merging mrshu/and-printing-test (dd7b3e4) into master (2abef4f).
@mrshu: Please fix the test failures.
Python 2.5.0-final-0: fail
Python 2.6.6-final-0: fail
Python 2.7.2-final-0: fail
Python 2.6.8-final-0: fail
Python 2.7.3-final-0: fail
PyPy 2.0.0-beta-1; 2.7.3-final-42: fail
Python 3.2.2-final-0: pass
Python 3.3.0-final-0: pass
Python 3.2.3-final-0: pass
Python 3.3.0-final-0: pass
Python 3.3.0-final-0: pass
**Sphinx 1.1.3:** pass
Interesting.
It seems that pretty behaves differently on those platforms. I'm not sure how to fix this.
Look at how the tests are in test_pretty.py, and emulate that exactly. In fact, you might want to move these tests to that file.
That's sympy/printing/pretty/test_pretty.py
.
I am not sure if it's a good idea to move it there because this test should be aimed at functionality of And (sorting of symbols) and thus, the test_boolarg.py
file seems appropreate.
I mimicked the upretty
function. Thanks for pointing that out.
The test_pretty file uses literals (not escaped characters), which I think just requires setting the encoding at the top correctly.
Ok, so you should I rather use literals?
It would make it easier to read.
And by the way, the relevant code is in the printing module. See for example https://github.com/sympy/sympy/blob/master/sympy/printing/str.py#L71. The sorted
call is the fix to the issue.
When you fix an issue in the future, add a link to the issue for the pull request, so others will know that work has been started.
Ok, I moved the tests to files I considered appropriate.
Sorry for not posting the link on Google issues, will do that next time.
BTW: wouldn't it be simpler if there were just GitHub issues? That way everything would be in one place.
It would, except we have a legacy of thousands of Google Code issues, and it's not so easy to migrate them to GitHub. Also, GitHub issues lack some of the nice features that Google Code has.
That looks good. If the tests pass, this can be merged.
Cool!
I just found this. I am not sure if there is a feature that would not be provided by GitHub but the argument with lots of issues is pretty valid.
Yes, Ondrej is absolutely right about GitHub. It's been a major boon to us, as well as to hundreds of other open source projects. But I don't think we've suffered too much by not having our issues here. We actually do have the GitHub issue tracker enabled, because it's the only way to search the pull requests (GitHub treats pull requests as issues), and people only open issues in that tracker about once a month or so. So I doubt we're missing much traffic. One feature that we do miss out on is the ability to automatically close issues mentioned by pull requests. And indeed, we do often forget to close issues when pull requests are merged (another reason why it's important to mention the pull request in the issue when you open it).
But on the other hand, Google Code offers very nice features for categorizing and searching for issues, which are completely lacking in GitHub, and it's pretty helpful when you've got over 1000 open issues, and over 3500 issues total.
Ok, now I see what you mean. The categorization of GitHub issues is far from clean.
Actually, you can automatically close an issue/pull request with GitHub if you metion "fix #issuenumber" in the commit message.
SymPy Bot Summary: Failed after merging mrshu/and-printing-test (8adf323) into master (c3e9d56).
@mrshu: Please fix the test failures.
Python 2.5.0-final-0: fail
Python 2.6.6-final-0: fail
Python 2.7.2-final-0: fail
Python 2.6.8-final-0: fail
Python 2.7.3-final-0: fail
PyPy 2.0.0-beta-1; 2.7.3-final-42: fail
Python 3.2.2-final-0: fail
Python 3.3.0-final-0: fail
Python 3.2.3-final-0: fail
Python 3.3.0-final-0: fail
Python 3.3.0-final-0: fail
Sphinx 1.1.3: pass
Yes, that's what I meant. You don't get that with google code.