Show More
@@ -2540,6 +2540,11 b' class InteractiveShell(SingletonConfigurable, Magic):' | |||
|
2540 | 2540 | code that has the appropriate information, rather than trying to |
|
2541 | 2541 | clutter |
|
2542 | 2542 | """ |
|
2543 | # Close the history session (this stores the end time and line count) | |
|
2544 | # this must be *before* the tempfile cleanup, in case of temporary | |
|
2545 | # history db | |
|
2546 | self.history_manager.end_session() | |
|
2547 | ||
|
2543 | 2548 | # Cleanup all tempfiles left around |
|
2544 | 2549 | for tfile in self.tempfiles: |
|
2545 | 2550 | try: |
@@ -2547,9 +2552,6 b' class InteractiveShell(SingletonConfigurable, Magic):' | |||
|
2547 | 2552 | except OSError: |
|
2548 | 2553 | pass |
|
2549 | 2554 | |
|
2550 | # Close the history session (this stores the end time and line count) | |
|
2551 | self.history_manager.end_session() | |
|
2552 | ||
|
2553 | 2555 | # Clear all user namespaces to release all references cleanly. |
|
2554 | 2556 | self.reset(new_session=False) |
|
2555 | 2557 |
@@ -194,6 +194,9 b' def start_ipython():' | |||
|
194 | 194 | |
|
195 | 195 | # A few more tweaks needed for playing nicely with doctests... |
|
196 | 196 | |
|
197 | # remove history file | |
|
198 | shell.tempfiles.append(config.HistoryManager.hist_file) | |
|
199 | ||
|
197 | 200 | # These traps are normally only active for interactive use, set them |
|
198 | 201 | # permanently since we'll be mocking interactive sessions. |
|
199 | 202 | shell.builtin_trap.activate() |
@@ -171,7 +171,7 b' def default_config():' | |||
|
171 | 171 | config.TerminalInteractiveShell.colors = 'NoColor' |
|
172 | 172 | config.TerminalTerminalInteractiveShell.term_title = False, |
|
173 | 173 | config.TerminalInteractiveShell.autocall = 0 |
|
174 |
config.HistoryManager.hist_file = |
|
|
174 | config.HistoryManager.hist_file = tempfile.mktemp(u'test_hist.sqlite') | |
|
175 | 175 | config.HistoryManager.db_cache_size = 10000 |
|
176 | 176 | return config |
|
177 | 177 |
General Comments 0
You need to be logged in to leave comments.
Login now