##// END OF EJS Templates
Moved unicode tests into main test suite. Reverified that both fail if the fixes in previous commits are undone.
Thomas Kluyver -
Show More
@@ -46,6 +46,14 b' def test_compiler():'
46 cp('x=1', 'single')
46 cp('x=1', 'single')
47 nt.assert_true(len(linecache.cache) > ncache)
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 def test_compiler_check_cache():
58 def test_compiler_check_cache():
51 """Test the compiler properly manages the cache.
59 """Test the compiler properly manages the cache.
@@ -17,7 +17,7 b' from IPython.utils.tempdir import TemporaryDirectory'
17 from IPython.core.history import HistoryManager, extract_hist_ranges
17 from IPython.core.history import HistoryManager, extract_hist_ranges
18
18
19 def test_history():
19 def test_history():
20
20 nt.assert_equal(sys.getdefaultencoding(), "ascii")
21 ip = get_ipython()
21 ip = get_ipython()
22 with TemporaryDirectory() as tmpdir:
22 with TemporaryDirectory() as tmpdir:
23 #tmpdir = '/software/temp'
23 #tmpdir = '/software/temp'
@@ -32,7 +32,7 b' def test_history():'
32 ip.history_manager.init_db() # Has to be called after changing file
32 ip.history_manager.init_db() # Has to be called after changing file
33 ip.history_manager.reset()
33 ip.history_manager.reset()
34 print 'test',histfile
34 print 'test',histfile
35 hist = ['a=1', 'def f():\n test = 1\n return test', 'b=2']
35 hist = ['a=1', 'def f():\n test = 1\n return test', u'b="žćčšđ"']
36 for i, h in enumerate(hist, start=1):
36 for i, h in enumerate(hist, start=1):
37 ip.history_manager.store_inputs(i, h)
37 ip.history_manager.store_inputs(i, h)
38
38
@@ -92,6 +92,7 b' def test_history():'
92 # Restore history manager
92 # Restore history manager
93 ip.history_manager = hist_manager_ori
93 ip.history_manager = hist_manager_ori
94
94
95
95 def test_extract_hist_ranges():
96 def test_extract_hist_ranges():
96 instr = "1 2/3 ~4/5-6 ~4/7-~4/9 ~9/2-~7/5"
97 instr = "1 2/3 ~4/5-6 ~4/7-~4/9 ~9/2-~7/5"
97 expected = [(0, 1, 2), # 0 == current session
98 expected = [(0, 1, 2), # 0 == current session
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now