##// END OF EJS Templates
Tweak test for magic_cpaste.
Thomas Kluyver -
Show More
@@ -324,10 +324,9 b' def check_cpaste(code, should_fail=False):'
324 _ip.user_ns['code_ran'] = False
324 _ip.user_ns['code_ran'] = False
325
325
326 src = StringIO()
326 src = StringIO()
327 try:
327 if not hasattr(src, 'encoding'):
328 src.encoding = None # IPython expects stdin to have an encoding attribute
328 # IPython expects stdin to have an encoding attribute
329 except Exception:
329 src.encoding = None
330 pass # ...but it's a read-only attribute in Python 3
331 src.write('\n')
330 src.write('\n')
332 src.write(code)
331 src.write(code)
333 src.write('\n--\n')
332 src.write('\n--\n')
General Comments 0
You need to be logged in to leave comments. Login now