Skip to content

Commit

Permalink
Moved unicode tests into main test suite. Reverified that both fail i…
Browse files Browse the repository at this point in the history
…f the fixes in previous commits are undone.
  • Loading branch information
takluyver committed Mar 24, 2011
1 parent 66d514c commit 88c823a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 53 deletions.
8 changes: 8 additions & 0 deletions IPython/core/tests/test_compilerop.py
Expand Up @@ -46,6 +46,14 @@ def test_compiler():
cp('x=1', 'single')
nt.assert_true(len(linecache.cache) > ncache)

def test_compiler_unicode():
import sys
nt.assert_equal(sys.getdefaultencoding(), "ascii")

cp = compilerop.CachingCompiler()
ncache = len(linecache.cache)
cp(u"t = 'žćčšđ'", "single")
nt.assert_true(len(linecache.cache) > ncache)

def test_compiler_check_cache():
"""Test the compiler properly manages the cache.
Expand Down
5 changes: 3 additions & 2 deletions IPython/core/tests/test_history.py
Expand Up @@ -17,7 +17,7 @@
from IPython.core.history import HistoryManager, extract_hist_ranges

def test_history():

nt.assert_equal(sys.getdefaultencoding(), "ascii")
ip = get_ipython()
with TemporaryDirectory() as tmpdir:
#tmpdir = '/software/temp'
Expand All @@ -32,7 +32,7 @@ def test_history():
ip.history_manager.init_db() # Has to be called after changing file
ip.history_manager.reset()
print 'test',histfile
hist = ['a=1', 'def f():\n test = 1\n return test', 'b=2']
hist = ['a=1', 'def f():\n test = 1\n return test', u'b="žćčšđ"']
for i, h in enumerate(hist, start=1):
ip.history_manager.store_inputs(i, h)

Expand Down Expand Up @@ -92,6 +92,7 @@ def test_history():
# Restore history manager
ip.history_manager = hist_manager_ori


def test_extract_hist_ranges():
instr = "1 2/3 ~4/5-6 ~4/7-~4/9 ~9/2-~7/5"
expected = [(0, 1, 2), # 0 == current session
Expand Down
51 changes: 0 additions & 51 deletions tools/unicode_tests.py

This file was deleted.

0 comments on commit 88c823a

Please sign in to comment.