Show More
@@ -53,7 +53,16 b' def test_autocall_binops():' | |||||
53 | def test_issue114(): |
|
53 | def test_issue114(): | |
54 | """Check that multiline string literals don't expand as magic |
|
54 | """Check that multiline string literals don't expand as magic | |
55 | see http://github.com/ipython/ipython/issues/#issue/114""" |
|
55 | see http://github.com/ipython/ipython/issues/#issue/114""" | |
|
56 | ||||
56 | template = '"""\n%s\n"""' |
|
57 | template = '"""\n%s\n"""' | |
57 | for mgk in ip.lsmagic(): |
|
58 | # Store the current value of multi_line_specials and turn it off before | |
58 | raw = template % mgk |
|
59 | # running test, since it could be true (case in which the test doesn't make | |
59 | yield nt.assert_equals(ip.prefilter(raw), raw) |
|
60 | # sense, as multiline string literals *will* expand as magic in that case). | |
|
61 | msp = ip.prefilter_manager.multi_line_specials | |||
|
62 | ip.prefilter_manager.multi_line_specials = False | |||
|
63 | try: | |||
|
64 | for mgk in ip.lsmagic(): | |||
|
65 | raw = template % mgk | |||
|
66 | yield nt.assert_equals(ip.prefilter(raw), raw) | |||
|
67 | finally: | |||
|
68 | ip.prefilter_manager.multi_line_specials = msp |
General Comments 0
You need to be logged in to leave comments.
Login now