@@ -338,19 +338,6 @@ def failing_hook(*args, **kwargs):
338338 finally :
339339 trap .hook = save_hook
340340
341- @skipif (sys .version_info [0 ] >= 3 , "softspace removed in py3" )
342- def test_print_softspace (self ):
343- """Verify that softspace is handled correctly when executing multiple
344- statements.
345-
346- In [1]: print 1; print 2
347- 1
348- 2
349-
350- In [2]: print 1,; print 2
351- 1 2
352- """
353-
354341 def test_ofind_line_magic (self ):
355342 from IPython .core .magic import register_line_magic
356343
@@ -466,22 +453,6 @@ def my_handler(shell, etype, value, tb, tb_offset=None):
466453 # Reset the custom exception hook
467454 ip .set_custom_exc ((), None )
468455
469- @skipif (sys .version_info [0 ] >= 3 , "no differences with __future__ in py3" )
470- def test_future_environment (self ):
471- "Can we run code with & without the shell's __future__ imports?"
472- ip .run_cell ("from __future__ import division" )
473- ip .run_cell ("a = 1/2" , shell_futures = True )
474- self .assertEqual (ip .user_ns ['a' ], 0.5 )
475- ip .run_cell ("b = 1/2" , shell_futures = False )
476- self .assertEqual (ip .user_ns ['b' ], 0 )
477-
478- ip .compile .reset_compiler_flags ()
479- # This shouldn't leak to the shell's compiler
480- ip .run_cell ("from __future__ import division \n c=1/2" , shell_futures = False )
481- self .assertEqual (ip .user_ns ['c' ], 0.5 )
482- ip .run_cell ("d = 1/2" , shell_futures = True )
483- self .assertEqual (ip .user_ns ['d' ], 0 )
484-
485456 def test_mktempfile (self ):
486457 filename = ip .mktempfile ()
487458 # Check that we can open the file again on Windows
@@ -509,10 +480,7 @@ def test_get_exception_only(self):
509480 raise DerivedInterrupt ("foo" )
510481 except KeyboardInterrupt :
511482 msg = ip .get_exception_only ()
512- if sys .version_info [0 ] <= 2 :
513- self .assertEqual (msg , 'DerivedInterrupt: foo\n ' )
514- else :
515- self .assertEqual (msg , 'IPython.core.tests.test_interactiveshell.DerivedInterrupt: foo\n ' )
483+ self .assertEqual (msg , 'IPython.core.tests.test_interactiveshell.DerivedInterrupt: foo\n ' )
516484
517485 def test_inspect_text (self ):
518486 ip .run_cell ('a = 5' )
0 commit comments