ipython / ipython

Compare 7fb86c5 ... +18 ... 24290cb

Coverage Reach
core/tests/test_completer.py core/tests/test_magic.py core/tests/test_interactiveshell.py core/tests/test_inputsplitter.py core/tests/test_formatters.py core/tests/test_display.py core/tests/test_run.py core/tests/test_oinspect.py core/tests/test_ultratb.py core/tests/test_pylabtools.py core/tests/test_debugger.py core/tests/test_inputtransformer2.py core/tests/test_history.py core/tests/test_completerlib.py core/tests/test_async_helpers.py core/tests/test_paths.py core/tests/test_magic_terminal.py core/tests/test_inputtransformer.py core/tests/test_profile.py core/tests/test_magic_arguments.py core/tests/test_prefilter.py core/tests/test_displayhook.py core/tests/test_events.py core/tests/test_extension.py core/tests/test_application.py core/tests/test_hooks.py core/tests/test_alias.py core/tests/test_imports.py core/tests/test_compilerop.py core/tests/test_inputtransformer2_line.py core/tests/test_handlers.py core/tests/test_shellapp.py core/tests/test_iplib.py core/tests/simpleerr.py core/tests/test_prompts.py core/tests/test_logger.py core/tests/tclass.py core/tests/refbug.py core/tests/test_splitinput.py core/tests/test_autocall.py core/tests/test_page.py core/tests/bad_all.py core/tests/print_argv.py core/tests/nonascii2.py core/tests/nonascii.py core/magics/execution.py core/magics/osm.py core/magics/code.py core/magics/basic.py core/magics/namespace.py core/magics/script.py core/magics/history.py core/magics/logging.py core/magics/packaging.py core/magics/auto.py core/magics/config.py core/magics/pylab.py core/magics/display.py core/magics/extension.py core/magics/__init__.py core/interactiveshell.py core/completer.py core/debugger.py core/oinspect.py core/ultratb.py core/display.py core/inputtransformer2.py core/history.py core/formatters.py core/inputsplitter.py core/prefilter.py core/inputtransformer.py core/magic.py core/application.py core/shellapp.py core/completerlib.py core/page.py core/displayhook.py core/pylabtools.py core/profileapp.py core/profiledir.py core/logger.py core/alias.py core/magic_arguments.py core/historyapp.py core/extensions.py core/display_functions.py core/crashhandler.py core/async_helpers.py core/hooks.py core/compilerop.py core/events.py core/builtin_trap.py core/displaypub.py core/splitinput.py core/macro.py core/display_trap.py core/release.py core/payload.py core/autocall.py core/payloadpage.py core/excolors.py core/prompts.py core/usage.py core/error.py core/getipython.py core/latex_symbols.py utils/tests/test_path.py utils/tests/test_text.py utils/tests/test_process.py utils/tests/test_tokenutil.py utils/tests/test_capture.py utils/tests/test_wildcard.py utils/tests/test_io.py utils/tests/test_dir2.py utils/tests/test_module_paths.py utils/tests/test_openpy.py utils/tests/test_pycolorize.py utils/tests/test_tempdir.py utils/tests/test_imports.py utils/tests/test_importstring.py utils/tests/test_shimmodule.py utils/tests/test_decorators.py utils/tests/test_sysinfo.py utils/_process_win32_controller.py utils/text.py utils/path.py utils/io.py utils/PyColorize.py utils/capture.py utils/_process_win32.py utils/_process_posix.py utils/ipstruct.py utils/_process_common.py utils/coloransi.py utils/tokenutil.py utils/terminal.py utils/shimmodule.py utils/wildcard.py utils/py3compat.py utils/openpy.py utils/sysinfo.py utils/_process_cli.py utils/timing.py utils/dir2.py utils/strdispatch.py utils/syspathcontext.py utils/process.py utils/contexts.py utils/tempdir.py utils/encoding.py utils/frame.py utils/tz.py utils/decorators.py utils/module_paths.py utils/importstring.py utils/generics.py utils/sentinel.py utils/ulinecache.py utils/colorable.py utils/version.py utils/data.py utils/localinterfaces.py utils/jsonutil.py utils/eventful.py utils/log.py utils/traitlets.py utils/daemonize.py utils/signatures.py utils/_sysinfo.py lib/tests/test_pretty.py lib/tests/test_display.py lib/tests/test_latextools.py lib/tests/test_lexers.py lib/tests/test_backgroundjobs.py lib/tests/test_editorhooks.py lib/tests/test_deepreload.py lib/tests/test_security.py lib/tests/test_clipboard.py lib/tests/test_imports.py lib/pretty.py lib/inputhook.py lib/display.py lib/demo.py lib/backgroundjobs.py lib/deepreload.py lib/lexers.py lib/latextools.py lib/inputhookwx.py lib/inputhookglut.py lib/inputhookqt4.py lib/guisupport.py lib/editorhooks.py lib/inputhookpyglet.py lib/clipboard.py lib/security.py lib/inputhookgtk4.py lib/inputhookgtk3.py lib/inputhookgtk.py lib/kernel.py lib/__init__.py terminal/pt_inputhooks/wx.py terminal/pt_inputhooks/osx.py terminal/pt_inputhooks/glut.py terminal/pt_inputhooks/qt.py terminal/pt_inputhooks/pyglet.py terminal/pt_inputhooks/__init__.py terminal/pt_inputhooks/tk.py terminal/pt_inputhooks/gtk4.py terminal/pt_inputhooks/asyncio.py terminal/pt_inputhooks/gtk.py terminal/pt_inputhooks/gtk3.py terminal/interactiveshell.py terminal/tests/test_interactivshell.py terminal/tests/test_embed.py terminal/tests/test_debug_magic.py terminal/tests/test_help.py terminal/shortcuts.py terminal/embed.py terminal/ipapp.py terminal/ptutils.py terminal/debugger.py terminal/magics.py terminal/prompts.py terminal/console.py terminal/ptshell.py testing/plugin/ipdoctest.py testing/plugin/dtexample.py testing/plugin/iptest.py testing/plugin/show_refs.py testing/plugin/test_refs.py testing/plugin/simple.py testing/plugin/test_ipdoctest.py testing/plugin/setup.py testing/plugin/simplevars.py testing/iptestcontroller.py testing/iptest.py testing/tools.py testing/tests/test_tools.py testing/tests/test_decorators.py testing/tests/test_ipunittest.py testing/tests/__init__.py testing/decorators.py testing/ipunittest.py testing/globalipapp.py testing/__init__.py testing/skipdoctest.py testing/__main__.py extensions/tests/test_autoreload.py extensions/tests/test_storemagic.py extensions/autoreload.py extensions/storemagic.py extensions/__init__.py

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -8,6 +8,7 @@
Loading
8 8
9 9
# Our own
10 10
from IPython.testing import decorators as dec
11 +
from IPython.testing.skipdoctest import skip_doctest
11 12
12 13
#-----------------------------------------------------------------------------
13 14
# Utilities
@@ -56,6 +57,7 @@
Loading
56 57
57 58
# Verify that we can correctly skip the doctest for a function at will, but
58 59
# that the docstring itself is NOT destroyed by the decorator.
60 +
@skip_doctest
59 61
def doctest_bad(x,y=1,**k):
60 62
    """A function whose doctest we need to skip.
61 63
@@ -103,6 +105,7 @@
Loading
103 105
    2
104 106
    """
105 107
108 +
    @skip_doctest
106 109
    def __init__(self,x):
107 110
        """Make a FooClass.
108 111
@@ -114,6 +117,7 @@
Loading
114 117
        print('Making a FooClass.')
115 118
        self.x = x
116 119
        
120 +
    @skip_doctest
117 121
    def bar(self,y):
118 122
        """Example:
119 123

@@ -205,6 +205,8 @@
Loading
205 205
    # should we keep suppressing warnings here, even after removing shims?
206 206
    env['PYTHONWARNINGS'] = 'ignore'
207 207
    # env.pop('PYTHONWARNINGS', None)  # Avoid extraneous warnings appearing on stderr
208 +
    # Prevent coloring under PyCharm ("\x1b[0m" at the end of the stdout)
209 +
    env.pop("PYCHARM_HOSTED", None)
208 210
    for k, v in env.items():
209 211
        # Debug a bizarre failure we've seen on Windows:
210 212
        # TypeError: environment can only contain strings

@@ -69,31 +69,33 @@
Loading
69 69
    Generate a sound
70 70
71 71
    >>> import numpy as np
72 -
    ... framerate = 44100
73 -
    ... t = np.linspace(0,5,framerate*5)
74 -
    ... data = np.sin(2*np.pi*220*t) + np.sin(2*np.pi*224*t)
75 -
    ... Audio(data, rate=framerate)
72 +
    >>> framerate = 44100
73 +
    >>> t = np.linspace(0,5,framerate*5)
74 +
    >>> data = np.sin(2*np.pi*220*t) + np.sin(2*np.pi*224*t)
75 +
    >>> Audio(data, rate=framerate)
76 +
    <IPython.lib.display.Audio object>
76 77
77 78
    Can also do stereo or more channels
78 79
79 80
    >>> dataleft = np.sin(2*np.pi*220*t)
80 -
    ... dataright = np.sin(2*np.pi*224*t)
81 -
    ... Audio([dataleft, dataright], rate=framerate)
81 +
    >>> dataright = np.sin(2*np.pi*224*t)
82 +
    >>> Audio([dataleft, dataright], rate=framerate)
83 +
    <IPython.lib.display.Audio object>
82 84
83 85
    From URL:
84 86
85 -
    >>> Audio("http://www.nch.com.au/acm/8k16bitpcm.wav")
86 -
    >>> Audio(url="http://www.w3schools.com/html/horse.ogg")
87 +
    >>> Audio("http://www.nch.com.au/acm/8k16bitpcm.wav")  # doctest: +SKIP
88 +
    >>> Audio(url="http://www.w3schools.com/html/horse.ogg")  # doctest: +SKIP
87 89
88 90
    From a File:
89 91
90 -
    >>> Audio('/path/to/sound.wav')
91 -
    >>> Audio(filename='/path/to/sound.ogg')
92 +
    >>> Audio('/path/to/sound.wav')  # doctest: +SKIP
93 +
    >>> Audio(filename='/path/to/sound.ogg')  # doctest: +SKIP
92 94
93 95
    From Bytes:
94 96
95 -
    >>> Audio(b'RAW_WAV_DATA..')
96 -
    >>> Audio(data=b'RAW_WAV_DATA..')
97 +
    >>> Audio(b'RAW_WAV_DATA..')  # doctest: +SKIP
98 +
    >>> Audio(data=b'RAW_WAV_DATA..')  # doctest: +SKIP
97 99
98 100
    See Also
99 101
    --------

@@ -48,7 +48,7 @@
Loading
48 48
    Examples
49 49
    --------
50 50
    >>> passwd('mypassword')
51 -
    'sha1:7cf3:b7d6da294ea9592a9480c8f52e63cd42cfb9dd12'
51 +
    'sha1:7cf3:b7d6da294ea9592a9480c8f52e63cd42cfb9dd12'  # random
52 52
53 53
    """
54 54
    if passphrase is None:

@@ -4,6 +4,9 @@
Loading
4 4
All tests should be loaded by nose.
5 5
"""
6 6
7 +
import os
8 +
9 +
7 10
def pyfunc():
8 11
    """Some pure python tests...
9 12
@@ -38,18 +41,6 @@
Loading
38 41
    0 1 1 2 2 3 
39 42
40 43
41 -
    Examples that access the operating system work:
42 -
43 -
    In [1]: !echo hello
44 -
    hello
45 -
46 -
    In [2]: !echo hello > /tmp/foo_iptest
47 -
48 -
    In [3]: !cat /tmp/foo_iptest
49 -
    hello
50 -
51 -
    In [4]: rm -f /tmp/foo_iptest
52 -
53 44
    It's OK to use '_' for the last result, but do NOT try to use IPython's
54 45
    numbered history of _NN outputs, since those won't exist under the
55 46
    doctest environment:
@@ -72,6 +63,25 @@
Loading
72 63
    return 'ipfunc'
73 64
74 65
66 +
def ipos():
67 +
    """Examples that access the operating system work:
68 +
69 +
    In [1]: !echo hello
70 +
    hello
71 +
72 +
    In [2]: !echo hello > /tmp/foo_iptest
73 +
74 +
    In [3]: !cat /tmp/foo_iptest
75 +
    hello
76 +
77 +
    In [4]: rm -f /tmp/foo_iptest
78 +
    """
79 +
    pass
80 +
81 +
82 +
ipos.__skip_doctest__ = os.name == "nt"
83 +
84 +
75 85
def ranfunc():
76 86
    """A function with some random output.
77 87

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Learn more Showing 35 files with coverage changes found.

Changes in IPython/core/tests/test_completer.py
-1
+1
Loading file...
Changes in IPython/utils/text.py
-1
+1
Loading file...
Changes in IPython/core/magics/script.py
-1
+1
Loading file...
Changes in IPython/core/completer.py
-6
+6
Loading file...
Changes in IPython/utils/PyColorize.py
-1
+1
Loading file...
Changes in IPython/testing/tools.py
-2
+2
Loading file...
Changes in IPython/core/magics/osm.py
-4
+4
Loading file...
Changes in IPython/core/page.py
-2
+2
Loading file...
Changes in IPython/lib/display.py
-3
+3
Loading file...
Changes in IPython/core/application.py
-3
+3
Loading file...
Changes in IPython/utils/ipstruct.py
-1
+1
Loading file...
Changes in IPython/core/profiledir.py
-2
+2
Loading file...
Changes in IPython/core/alias.py
-2
+2
Loading file...
Changes in IPython/terminal/shortcuts.py
-4
+4
Loading file...
Changes in IPython/lib/editorhooks.py
-1
+1
Loading file...
Changes in IPython/terminal/magics.py
-2
+2
Loading file...
Changes in IPython/terminal/interactiveshell.py
-7
+7
Loading file...
Changes in IPython/utils/sysinfo.py
-1
+1
Loading file...
Changes in IPython/utils/coloransi.py
-2
+2
Loading file...
Changes in IPython/testing/iptest.py
-7
+7
Loading file...
Changes in IPython/utils/py3compat.py
-2
+2
Loading file...
Changes in IPython/lib/tests/test_editorhooks.py
-1
+1
Loading file...
Changes in IPython/core/tests/test_profile.py
-4
+4
Loading file...
Changes in IPython/utils/tests/test_process.py
-6
+6
Loading file...
Changes in IPython/utils/path.py
-13
+13
Loading file...
Changes in IPython/core/excolors.py
-1
+1
Loading file...
Changes in IPython/utils/process.py
-3
+3
Loading file...
Changes in IPython/utils/tests/test_path.py
-33
+33
Loading file...
Changes in IPython/utils/timing.py
-4
+4
Loading file...
Changes in IPython/testing/tests/test_tools.py
-8
+8
Loading file...
Changes in IPython/utils/terminal.py
-9
+9
Loading file...
Changes in IPython/lib/tests/test_clipboard.py
-2
+2
Loading file...
Changes in IPython/utils/_process_common.py
-13
+13
Loading file...
Changes in IPython/lib/clipboard.py
-11
+11
Loading file...
Changes in IPython/utils/_process_win32.py
-64
+64
Loading file...

20 Commits

-37
-34
-3
+227
-227
Hiding 1 contexual commits
+1
-1
+1
+1
+7
+2
+5
-7
-3
-4
Hiding 6 contexual commits
+8
+4
+4
+37
+34
+3
Files Coverage
IPython 0.81% 47.96%
Project Totals (253 files) 47.96%
Loading