Show More
@@ -46,6 +46,14 b' def test_compiler():' | |||
|
46 | 46 | cp('x=1', 'single') |
|
47 | 47 | nt.assert_true(len(linecache.cache) > ncache) |
|
48 | 48 | |
|
49 | def test_compiler_unicode(): | |
|
50 | import sys | |
|
51 | nt.assert_equal(sys.getdefaultencoding(), "ascii") | |
|
52 | ||
|
53 | cp = compilerop.CachingCompiler() | |
|
54 | ncache = len(linecache.cache) | |
|
55 | cp(u"t = 'žćčšđ'", "single") | |
|
56 | nt.assert_true(len(linecache.cache) > ncache) | |
|
49 | 57 | |
|
50 | 58 | def test_compiler_check_cache(): |
|
51 | 59 | """Test the compiler properly manages the cache. |
@@ -17,7 +17,7 b' from IPython.utils.tempdir import TemporaryDirectory' | |||
|
17 | 17 | from IPython.core.history import HistoryManager, extract_hist_ranges |
|
18 | 18 | |
|
19 | 19 | def test_history(): |
|
20 | ||
|
20 | nt.assert_equal(sys.getdefaultencoding(), "ascii") | |
|
21 | 21 | ip = get_ipython() |
|
22 | 22 | with TemporaryDirectory() as tmpdir: |
|
23 | 23 | #tmpdir = '/software/temp' |
@@ -32,7 +32,7 b' def test_history():' | |||
|
32 | 32 | ip.history_manager.init_db() # Has to be called after changing file |
|
33 | 33 | ip.history_manager.reset() |
|
34 | 34 | print 'test',histfile |
|
35 |
hist = ['a=1', 'def f():\n test = 1\n return test', 'b= |
|
|
35 | hist = ['a=1', 'def f():\n test = 1\n return test', u'b="žćčšđ"'] | |
|
36 | 36 | for i, h in enumerate(hist, start=1): |
|
37 | 37 | ip.history_manager.store_inputs(i, h) |
|
38 | 38 | |
@@ -92,6 +92,7 b' def test_history():' | |||
|
92 | 92 | # Restore history manager |
|
93 | 93 | ip.history_manager = hist_manager_ori |
|
94 | 94 | |
|
95 | ||
|
95 | 96 | def test_extract_hist_ranges(): |
|
96 | 97 | instr = "1 2/3 ~4/5-6 ~4/7-~4/9 ~9/2-~7/5" |
|
97 | 98 | expected = [(0, 1, 2), # 0 == current session |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now