Show More
@@ -1,4 +1,4 b'' | |||||
1 | # coding: iso-8859-5 |
|
1 | # coding: iso-8859-5 | |
2 | # (Unlikely to be the default encoding for most testers.) |
|
2 | # (Unlikely to be the default encoding for most testers.) | |
3 | # ������������������� <- Cyrillic characters |
|
3 | # ������������������� <- Cyrillic characters | |
4 |
u = |
|
4 | u = "����" |
@@ -1,11 +1,14 b'' | |||||
1 | # encoding: utf-8 |
|
1 | # encoding: utf-8 | |
2 | from IPython.testing import decorators as dec |
|
2 | from IPython.testing import decorators as dec | |
3 |
|
3 | |||
|
4 | ||||
4 | def test_import_backgroundjobs(): |
|
5 | def test_import_backgroundjobs(): | |
5 | from IPython.lib import backgroundjobs |
|
6 | from IPython.lib import backgroundjobs | |
6 |
|
7 | |||
|
8 | ||||
7 | def test_import_deepreload(): |
|
9 | def test_import_deepreload(): | |
8 | from IPython.lib import deepreload |
|
10 | from IPython.lib import deepreload | |
9 |
|
11 | |||
|
12 | ||||
10 | def test_import_demo(): |
|
13 | def test_import_demo(): | |
11 | from IPython.lib import demo |
|
14 | from IPython.lib import demo |
@@ -31,8 +31,7 b' from prompt_toolkit import __version__ as ptk_version' | |||||
31 |
|
31 | |||
32 | from IPython.core.async_helpers import get_asyncio_loop |
|
32 | from IPython.core.async_helpers import get_asyncio_loop | |
33 |
|
33 | |||
34 |
PTK3 = ptk_version.startswith( |
|
34 | PTK3 = ptk_version.startswith("3.") | |
35 |
|
||||
36 |
|
35 | |||
37 |
|
36 | |||
38 | def inputhook(context): |
|
37 | def inputhook(context): |
@@ -41,6 +41,7 b' import gtk, gobject' | |||||
41 | # Enable threading in GTK. (Otherwise, GTK will keep the GIL.) |
|
41 | # Enable threading in GTK. (Otherwise, GTK will keep the GIL.) | |
42 | gtk.gdk.threads_init() |
|
42 | gtk.gdk.threads_init() | |
43 |
|
43 | |||
|
44 | ||||
44 | def inputhook(context): |
|
45 | def inputhook(context): | |
45 | """ |
|
46 | """ | |
46 | When the eventloop of prompt-toolkit is idle, call this inputhook. |
|
47 | When the eventloop of prompt-toolkit is idle, call this inputhook. | |
@@ -50,6 +51,7 b' def inputhook(context):' | |||||
50 |
|
51 | |||
51 | :param context: An `InputHookContext` instance. |
|
52 | :param context: An `InputHookContext` instance. | |
52 | """ |
|
53 | """ | |
|
54 | ||||
53 | def _main_quit(*a, **kw): |
|
55 | def _main_quit(*a, **kw): | |
54 | gtk.main_quit() |
|
56 | gtk.main_quit() | |
55 | return False |
|
57 | return False |
@@ -3,10 +3,12 b'' | |||||
3 |
|
3 | |||
4 | from gi.repository import Gtk, GLib |
|
4 | from gi.repository import Gtk, GLib | |
5 |
|
5 | |||
|
6 | ||||
6 | def _main_quit(*args, **kwargs): |
|
7 | def _main_quit(*args, **kwargs): | |
7 | Gtk.main_quit() |
|
8 | Gtk.main_quit() | |
8 | return False |
|
9 | return False | |
9 |
|
10 | |||
|
11 | ||||
10 | def inputhook(context): |
|
12 | def inputhook(context): | |
11 | GLib.io_add_watch(context.fileno(), GLib.PRIORITY_DEFAULT, GLib.IO_IN, _main_quit) |
|
13 | GLib.io_add_watch(context.fileno(), GLib.PRIORITY_DEFAULT, GLib.IO_IN, _main_quit) | |
12 | Gtk.main() |
|
14 | Gtk.main() |
@@ -19,7 +19,6 b' def test_base():' | |||||
19 |
|
19 | |||
20 |
|
20 | |||
21 | def test_SubClass(): |
|
21 | def test_SubClass(): | |
22 |
|
||||
23 | class SubClass(Base): |
|
22 | class SubClass(Base): | |
24 | y = 2 |
|
23 | y = 2 | |
25 |
|
24 | |||
@@ -53,7 +52,7 b' def test_misbehaving_object_without_trait_names():' | |||||
53 |
|
52 | |||
54 | class SillierWithDir(MisbehavingGetattr): |
|
53 | class SillierWithDir(MisbehavingGetattr): | |
55 | def __dir__(self): |
|
54 | def __dir__(self): | |
56 |
return [ |
|
55 | return ["some_method"] | |
57 |
|
56 | |||
58 | for bad_klass in (MisbehavingGetattr, SillierWithDir): |
|
57 | for bad_klass in (MisbehavingGetattr, SillierWithDir): | |
59 | obj = bad_klass() |
|
58 | obj = bad_klass() |
@@ -346,7 +346,7 b' def git_prebuild(pkg_dir, build_cmd=build_py):' | |||||
346 | out_file.writelines( |
|
346 | out_file.writelines( | |
347 | [ |
|
347 | [ | |
348 | "# GENERATED BY setup.py\n", |
|
348 | "# GENERATED BY setup.py\n", | |
349 |
'commit = |
|
349 | 'commit = "%s"\n' % repo_commit, | |
350 | ] |
|
350 | ] | |
351 | ) |
|
351 | ) | |
352 |
|
352 |
General Comments 0
You need to be logged in to leave comments.
Login now