Show More
@@ -11,6 +11,7 b' import os' | |||||
11 | import sys |
|
11 | import sys | |
12 | import tempfile |
|
12 | import tempfile | |
13 | from datetime import datetime |
|
13 | from datetime import datetime | |
|
14 | import sqlite3 | |||
14 |
|
15 | |||
15 | # third party |
|
16 | # third party | |
16 | import nose.tools as nt |
|
17 | import nose.tools as nt | |
@@ -19,10 +20,12 b' import nose.tools as nt' | |||||
19 | from traitlets.config.loader import Config |
|
20 | from traitlets.config.loader import Config | |
20 | from IPython.utils.tempdir import TemporaryDirectory |
|
21 | from IPython.utils.tempdir import TemporaryDirectory | |
21 | from IPython.core.history import HistoryManager, extract_hist_ranges |
|
22 | from IPython.core.history import HistoryManager, extract_hist_ranges | |
|
23 | from IPython.testing.decorators import skipif | |||
22 |
|
24 | |||
23 | def setUp(): |
|
25 | def setUp(): | |
24 | nt.assert_equal(sys.getdefaultencoding(), "utf-8") |
|
26 | nt.assert_equal(sys.getdefaultencoding(), "utf-8") | |
25 |
|
27 | |||
|
28 | @skipif(sqlite3.sqlite_version_info > (3,24,0)) | |||
26 | def test_history(): |
|
29 | def test_history(): | |
27 | ip = get_ipython() |
|
30 | ip = get_ipython() | |
28 | with TemporaryDirectory() as tmpdir: |
|
31 | with TemporaryDirectory() as tmpdir: | |
@@ -85,6 +88,7 b' def test_history():' | |||||
85 | nt.assert_equal(list(gothist), expected) |
|
88 | nt.assert_equal(list(gothist), expected) | |
86 |
|
89 | |||
87 | # Check get_hist_search |
|
90 | # Check get_hist_search | |
|
91 | ||||
88 | gothist = ip.history_manager.search("*test*") |
|
92 | gothist = ip.history_manager.search("*test*") | |
89 | nt.assert_equal(list(gothist), [(1,2,hist[1])] ) |
|
93 | nt.assert_equal(list(gothist), [(1,2,hist[1])] ) | |
90 |
|
94 |
General Comments 0
You need to be logged in to leave comments.
Login now