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

capture some logging/warning output in some tests #5203

Merged
merged 8 commits into from Feb 28, 2014

Conversation

minrk
Copy link
Member

@minrk minrk commented Feb 23, 2014

A few tests were generating log statements or warnings in iptest output. This captures those log statements and warnings.

It also adds the @onlyif_any_cmd_exists decorator, which is like @onlyif_cmds_exist, but pass if any is available instead of all, and then uses that to allow nbconvert html tests to run with node instead of pandoc.

like @onlyif_cmds_exist, but pass if any is available instead of all
this could probably be made more general,
but these were the two places I noticed log output.
@minrk
Copy link
Member Author

minrk commented Feb 23, 2014

And install nodejs on travis

record is keyword only on Python 3
@@ -11,7 +11,7 @@ before_install:
# Pierre Carrier's PPA for PhantomJS and CasperJS
- sudo add-apt-repository -y ppa:pcarrier/ppa
- sudo apt-get update
- sudo apt-get install pandoc casperjs
- sudo apt-get install pandoc casperjs nodejs
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to install marked? Or does nbconvert use our included version?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, we only need nodejs. We use the marked shipped in ipython components.

Copy link
Member

Choose a reason for hiding this comment

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

IIRC, it uses our included version...

Copy link
Member

Choose a reason for hiding this comment

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

je je... I did not reload the page (I usually do it because of the Min's speed to answer 😉)...

except ImportError as e:
# is_cmd_found uses pywin32 on windows, which might not be available
if sys.platform == 'win32' and 'pywin32' in str(e):
return skip("This test runs only if pywin32 and commands '{0}' "
Copy link
Member

Choose a reason for hiding this comment

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

Technically, one of the commands, but it's probably not important.

takluyver added a commit that referenced this pull request Feb 28, 2014
capture some logging/warning output in some tests
@takluyver takluyver merged commit 7a1f3e2 into ipython:master Feb 28, 2014
@minrk minrk deleted the test-log-warn branch March 31, 2014 23:36
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
capture some logging/warning output in some tests
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.

None yet

3 participants