Browse files

fix displayhook.quiet() check

enable @ivanov's test, as it now passes

closes gh-307
  • Loading branch information...
1 parent d0a5310 commit 1f0e9dad08a358f6ae39afbc953f830ef07f221c @minrk minrk committed Apr 8, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −1 IPython/core/displayhook.py
  2. +0 −1 IPython/core/tests/test_interactiveshell.py
View
3 IPython/core/displayhook.py
@@ -162,7 +162,8 @@ def quiet(self):
"""Should we silence the display hook because of ';'?"""
# do not print output if input ends in ';'
try:
- if self.shell.history_manager.input_hist_parsed[self.prompt_count].endswith(';\n'):
+ cell = self.shell.history_manager.input_hist_parsed[self.prompt_count]
+ if cell.rstrip().endswith(';'):
return True
except IndexError:
# some uses of ipshellembed may fail here
View
1 IPython/core/tests/test_interactiveshell.py
@@ -64,7 +64,6 @@ def test_multiline_string_cells(self):
ip.run_cell('tmp=1;"""a\nb"""\n')
self.assertEquals(ip.user_ns['tmp'], 1)
- @dec.skip_known_failure
def test_dont_cache_with_semicolon(self):
"Ending a line with semicolon should not cache the returned object (GH-307)"
ip = get_ipython()

0 comments on commit 1f0e9da

Please sign in to comment.