Show More
@@ -180,7 +180,7 class InteractiveShellTestCase(unittest.TestCase): | |||||
180 | "Code in functions must be able to access variables outside them." |
|
180 | "Code in functions must be able to access variables outside them." | |
181 | ip = get_ipython() |
|
181 | ip = get_ipython() | |
182 | ip.run_cell("a = 10") |
|
182 | ip.run_cell("a = 10") | |
183 | ip.run_cell(("def f(x):" |
|
183 | ip.run_cell(("def f(x):\n" | |
184 | " return x + a")) |
|
184 | " return x + a")) | |
185 | ip.run_cell("b = f(12)") |
|
185 | ip.run_cell("b = f(12)") | |
186 | self.assertEqual(ip.user_ns["b"], 22) |
|
186 | self.assertEqual(ip.user_ns["b"], 22) |
General Comments 0
You need to be logged in to leave comments.
Login now