Show More
@@ -139,10 +139,10 b' class InteractiveShellTestCase(unittest.TestCase):' | |||||
139 | ip = get_ipython() |
|
139 | ip = get_ipython() | |
140 | try: |
|
140 | try: | |
141 | ip.run_cell(u'byte_str = "a"') |
|
141 | ip.run_cell(u'byte_str = "a"') | |
142 |
assert isinstance(ip.user_ns['byte_str'], str) |
|
142 | assert isinstance(ip.user_ns['byte_str'], str) # string literals are byte strings by default | |
143 | ip.run_cell('from __future__ import unicode_literals') |
|
143 | ip.run_cell('from __future__ import unicode_literals') | |
144 | ip.run_cell(u'unicode_str = "a"') |
|
144 | ip.run_cell(u'unicode_str = "a"') | |
145 |
assert isinstance(ip.user_ns['unicode_str'], unicode) |
|
145 | assert isinstance(ip.user_ns['unicode_str'], unicode) # strings literals are now unicode | |
146 | finally: |
|
146 | finally: | |
147 | # Reset compiler flags so we don't mess up other tests. |
|
147 | # Reset compiler flags so we don't mess up other tests. | |
148 | ip.compile.reset_compiler_flags() |
|
148 | ip.compile.reset_compiler_flags() |
General Comments 0
You need to be logged in to leave comments.
Login now