Skip to content

fix %magic output#3468

Merged
ellisonbg merged 4 commits into
ipython:masterfrom
minrk:lsmagic
Jul 1, 2013
Merged

fix %magic output#3468
ellisonbg merged 4 commits into
ipython:masterfrom
minrk:lsmagic

Conversation

@minrk

@minrk minrk commented Jun 25, 2013

Copy link
Copy Markdown
Member

call lsmagic without underscore

closes #3467

minrk added 2 commits June 25, 2013 17:44
call lsmagic without underscore

closes ipython#3467
Comment thread IPython/core/tests/test_magic.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do have tt.AssertPrints, but it's a bit awkward for checking multiple things in the same block of output at present.

@takluyver

Copy link
Copy Markdown
Member

Other than that, looks fine to me.

Comment thread IPython/core/tests/test_magic.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @minrk, let's not use yield(foo, args) in tests ever. Nose does horrible things in these scenarios. Instead, let's do regular foo(args) so the stack is comprehensible.

Specifically, in this case you should do nt.assert_in('%magic', stdout), and similar for the ones below.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I was just copying the style of adjacent tests.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yields (and the parametric tests they produced) are removed, and I went ahead and applied the same changes to the rest of test_magic.

minrk added 2 commits June 29, 2013 12:29
use `assert_in` and `assert_equal` in place of a few `assert_true/false`
@takluyver

Copy link
Copy Markdown
Member

👍

ellisonbg added a commit that referenced this pull request Jul 1, 2013
@ellisonbg ellisonbg merged commit c54500a into ipython:master Jul 1, 2013
@minrk minrk deleted the lsmagic branch March 31, 2014 23:36
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
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.

%magic doesn't work

4 participants