Show More
@@ -144,7 +144,6 b' from sphinx.util.compat import Directive' | |||||
144 | from traitlets.config import Config |
|
144 | from traitlets.config import Config | |
145 | from IPython import InteractiveShell |
|
145 | from IPython import InteractiveShell | |
146 | from IPython.core.profiledir import ProfileDir |
|
146 | from IPython.core.profiledir import ProfileDir | |
147 | from IPython.utils import io |
|
|||
148 |
|
147 | |||
149 | #----------------------------------------------------------------------------- |
|
148 | #----------------------------------------------------------------------------- | |
150 | # Globals |
|
149 | # Globals |
@@ -1,7 +1,6 b'' | |||||
1 | """Enable pyglet to be used interacively with prompt_toolkit |
|
1 | """Enable pyglet to be used interacively with prompt_toolkit | |
2 | """ |
|
2 | """ | |
3 |
|
3 | |||
4 | import os |
|
|||
5 | import sys |
|
4 | import sys | |
6 | import time |
|
5 | import time | |
7 | from timeit import default_timer as clock |
|
6 | from timeit import default_timer as clock |
@@ -4,7 +4,6 b'' | |||||
4 | # Distributed under the terms of the Modified BSD License. |
|
4 | # Distributed under the terms of the Modified BSD License. | |
5 |
|
5 | |||
6 | import IPython.testing.tools as tt |
|
6 | import IPython.testing.tools as tt | |
7 | from IPython.testing.decorators import skip_without |
|
|||
8 |
|
7 | |||
9 |
|
8 | |||
10 | def test_ipython_help(): |
|
9 | def test_ipython_help(): |
@@ -11,11 +11,16 b' interface for IronPython will probably require you to help fill' | |||||
11 | in the details. |
|
11 | in the details. | |
12 | """ |
|
12 | """ | |
13 |
|
13 | |||
14 |
|
14 | # Import cli libraries: | ||
|
15 | import clr | |||
15 | import System |
|
16 | import System | |
|
17 | ||||
|
18 | # Import Python libraries: | |||
16 | import os |
|
19 | import os | |
17 | from IPython.utils import py3compat |
|
|||
18 |
|
20 | |||
|
21 | # Import IPython libraries: | |||
|
22 | from IPython.utils import py3compat | |||
|
23 | from ._process_common import arg_split | |||
19 |
|
24 | |||
20 | def _find_cmd(cmd): |
|
25 | def _find_cmd(cmd): | |
21 | """Find the full path to a command using which.""" |
|
26 | """Find the full path to a command using which.""" |
@@ -7,7 +7,6 b' Much of the code is taken from the tokenize module in Python 3.2.' | |||||
7 |
|
7 | |||
8 | import io |
|
8 | import io | |
9 | from io import TextIOWrapper, BytesIO |
|
9 | from io import TextIOWrapper, BytesIO | |
10 | import os.path |
|
|||
11 | import re |
|
10 | import re | |
12 | from tokenize import open, detect_encoding |
|
11 | from tokenize import open, detect_encoding | |
13 |
|
12 |
@@ -1,15 +1,13 b'' | |||||
1 | """ This module contains classes - NamedFileInTemporaryDirectory, TemporaryWorkingDirectory. |
|
1 | """ This module contains classes - NamedFileInTemporaryDirectory, TemporaryWorkingDirectory. | |
2 |
|
2 | |||
3 |
These classes add extra features such as creating a named file in temporary directory and |
|
3 | These classes add extra features such as creating a named file in temporary directory and | |
4 | creating a context manager for the working directory which is also temporary. |
|
4 | creating a context manager for the working directory which is also temporary. | |
5 | """ |
|
5 | """ | |
6 |
|
6 | |||
7 | import os as _os |
|
7 | import os as _os | |
8 | import warnings as _warnings |
|
|||
9 | import sys as _sys |
|
|||
10 |
|
||||
11 | from tempfile import TemporaryDirectory |
|
8 | from tempfile import TemporaryDirectory | |
12 |
|
9 | |||
|
10 | ||||
13 | class NamedFileInTemporaryDirectory(object): |
|
11 | class NamedFileInTemporaryDirectory(object): | |
14 |
|
12 | |||
15 | def __init__(self, filename, mode='w+b', bufsize=-1, **kwds): |
|
13 | def __init__(self, filename, mode='w+b', bufsize=-1, **kwds): | |
@@ -57,4 +55,3 b' class TemporaryWorkingDirectory(TemporaryDirectory):' | |||||
57 | def __exit__(self, exc, value, tb): |
|
55 | def __exit__(self, exc, value, tb): | |
58 | _os.chdir(self.old_wd) |
|
56 | _os.chdir(self.old_wd) | |
59 | return super(TemporaryWorkingDirectory, self).__exit__(exc, value, tb) |
|
57 | return super(TemporaryWorkingDirectory, self).__exit__(exc, value, tb) | |
60 |
|
@@ -17,12 +17,6 b' import sys' | |||||
17 | import warnings |
|
17 | import warnings | |
18 | from shutil import get_terminal_size as _get_terminal_size |
|
18 | from shutil import get_terminal_size as _get_terminal_size | |
19 |
|
19 | |||
20 | from . import py3compat |
|
|||
21 |
|
||||
22 | #----------------------------------------------------------------------------- |
|
|||
23 | # Code |
|
|||
24 | #----------------------------------------------------------------------------- |
|
|||
25 |
|
||||
26 | # This variable is part of the expected API of the module: |
|
20 | # This variable is part of the expected API of the module: | |
27 | ignore_termtitle = True |
|
21 | ignore_termtitle = True | |
28 |
|
22 |
@@ -1,11 +1,9 b'' | |||||
1 | import sys |
|
1 | import sys | |
2 | import warnings |
|
2 | import warnings | |
3 |
|
3 | |||
4 | import nose.tools as nt |
|
|||
5 |
|
||||
6 | from IPython.utils.capture import capture_output |
|
|||
7 | from IPython.utils.shimmodule import ShimWarning |
|
4 | from IPython.utils.shimmodule import ShimWarning | |
8 |
|
5 | |||
|
6 | ||||
9 | def test_shim_warning(): |
|
7 | def test_shim_warning(): | |
10 | sys.modules.pop('IPython.config', None) |
|
8 | sys.modules.pop('IPython.config', None) | |
11 | with warnings.catch_warnings(record=True) as w: |
|
9 | with warnings.catch_warnings(record=True) as w: |
General Comments 0
You need to be logged in to leave comments.
Login now