Show More
@@ -219,4 +219,4 class TestSafeExecfileNonAsciiPath(unittest.TestCase): | |||||
219 | def test_1(self): |
|
219 | def test_1(self): | |
220 | """Test safe_execfile with non-ascii path |
|
220 | """Test safe_execfile with non-ascii path | |
221 | """ |
|
221 | """ | |
222 | _ip.shell.safe_execfile(self.fname, raise_exceptions=True) |
|
222 | _ip.shell.safe_execfile(self.fname, {}, raise_exceptions=True) |
@@ -324,7 +324,10 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 | src.encoding = None # IPython expects stdin to have an encoding attribute |
|
327 | try: | |
|
328 | src.encoding = None # IPython expects stdin to have an encoding attribute | |||
|
329 | except Exception: | |||
|
330 | pass # ...but it's a read-only attribute in Python 3 | |||
328 | src.write('\n') |
|
331 | src.write('\n') | |
329 | src.write(code) |
|
332 | src.write(code) | |
330 | src.write('\n--\n') |
|
333 | src.write('\n--\n') |
General Comments 0
You need to be logged in to leave comments.
Login now