[sympy] added test for http://code.google.com/p/sympy/issues/detail?id=3029 (#1704)

1 view
Skip to first unread message

Marek Šuppa

unread,
Dec 28, 2012, 6:09:05 PM12/28/12
to sympy/sympy

The issue report here seemed to request some test. This pull request should provide it.


You can merge this Pull Request by running:

  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

Commit Summary

File Changes

  • M sympy/core/tests/test_logic.py (12)

Patch Links


Reply to this email directly or view it on GitHub.

Aaron Meurer

unread,
Dec 28, 2012, 9:48:48 PM12/28/12
to sympy/sympy

As you can see from the Travis tests, there are issues here.

Aaron Meurer

unread,
Dec 29, 2012, 9:37:43 AM12/29/12
to sympy/sympy

SymPy Bot Summary: :x: Could not fetch the branch mrshu/and-printing-test.
@mrshu: Please make sure that mrshu/and-printing-test has been pushed to GitHub and run the sympy-bot tests again.

Marek Šuppa

unread,
Dec 29, 2012, 5:18:58 PM12/29/12
to sympy/sympy

As it turned out, I was testing a wrong function =)

Aaron Meurer

unread,
Dec 29, 2012, 7:56:59 PM12/29/12
to sympy/sympy

Looks OK.

Aaron Meurer

unread,
Dec 30, 2012, 6:01:42 AM12/30/12
to sympy/sympy

SymPy Bot Summary: :red_circle: Failed after merging mrshu/and-printing-test (dd7b3e4) into master (2abef4f).
@mrshu: Please fix the test failures.
:red_circle:Python 2.5.0-final-0: fail
:red_circle:Python 2.6.6-final-0: fail
:red_circle:Python 2.7.2-final-0: fail
:red_circle:Python 2.6.8-final-0: fail
:red_circle:Python 2.7.3-final-0: fail
:red_circle:PyPy 2.0.0-beta-1; 2.7.3-final-42: fail
:eight_spoked_asterisk:Python 3.2.2-final-0: pass
:eight_spoked_asterisk:Python 3.3.0-final-0: pass
:eight_spoked_asterisk:Python 3.2.3-final-0: pass
:eight_spoked_asterisk:Python 3.3.0-final-0: pass
:eight_spoked_asterisk:Python 3.3.0-final-0: pass
:eight_spoked_asterisk:**Sphinx 1.1.3:** pass

Marek Šuppa

unread,
Dec 30, 2012, 6:25:23 AM12/30/12
to sympy/sympy

Interesting.

It seems that pretty behaves differently on those platforms. I'm not sure how to fix this.

Aaron Meurer

unread,
Dec 31, 2012, 3:46:55 PM12/31/12
to sympy/sympy

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.

Aaron Meurer

unread,
Dec 31, 2012, 3:47:04 PM12/31/12
to sympy/sympy

That's sympy/printing/pretty/test_pretty.py.

Marek Šuppa

unread,
Jan 1, 2013, 9:08:05 AM1/1/13
to sympy/sympy

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.

Aaron Meurer

unread,
Jan 1, 2013, 5:18:50 PM1/1/13
to sympy/sympy

The test_pretty file uses literals (not escaped characters), which I think just requires setting the encoding at the top correctly.

Marek Šuppa

unread,
Jan 1, 2013, 5:40:29 PM1/1/13
to sympy/sympy

Ok, so you should I rather use literals?

Aaron Meurer

unread,
Jan 1, 2013, 7:01:45 PM1/1/13
to sympy/sympy

It would make it easier to read.

Aaron Meurer

unread,
Jan 1, 2013, 7:03:16 PM1/1/13
to sympy/sympy

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.

Aaron Meurer

unread,
Jan 2, 2013, 3:11:16 AM1/2/13
to sympy/sympy

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.

Marek Šuppa

unread,
Jan 2, 2013, 4:53:51 AM1/2/13
to sympy/sympy

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.

Aaron Meurer

unread,
Jan 2, 2013, 5:39:31 AM1/2/13
to sympy/sympy

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.

Aaron Meurer

unread,
Jan 2, 2013, 5:40:58 AM1/2/13
to sympy/sympy

That looks good. If the tests pass, this can be merged.

Marek Šuppa

unread,
Jan 2, 2013, 5:55:03 AM1/2/13
to sympy/sympy

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.

Aaron Meurer

unread,
Jan 2, 2013, 6:07:49 AM1/2/13
to sympy/sympy

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.

Marek Šuppa

unread,
Jan 2, 2013, 6:10:48 AM1/2/13
to sympy/sympy

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.

Aaron Meurer

unread,
Jan 2, 2013, 11:15:38 AM1/2/13
to sympy/sympy

SymPy Bot Summary: :red_circle: Failed after merging mrshu/and-printing-test (8adf323) into master (c3e9d56).


@mrshu: Please fix the test failures.
:red_circle:Python 2.5.0-final-0: fail
:red_circle:Python 2.6.6-final-0: fail
:red_circle:Python 2.7.2-final-0: fail
:red_circle:Python 2.6.8-final-0: fail
:red_circle:Python 2.7.3-final-0: fail
:red_circle:PyPy 2.0.0-beta-1; 2.7.3-final-42: fail

:red_circle:Python 3.2.2-final-0: fail
:red_circle:Python 3.3.0-final-0: fail
:red_circle:Python 3.2.3-final-0: fail
:red_circle:Python 3.3.0-final-0: fail
:red_circle:Python 3.3.0-final-0: fail
:eight_spoked_asterisk:Sphinx 1.1.3: pass

Aaron Meurer

unread,
Jan 2, 2013, 3:28:06 PM1/2/13
to sympy/sympy

Yes, that's what I meant. You don't get that with google code.

Reply all
Reply to author
Forward
0 new messages