summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Bug 547354 – wrap a few memory stream methodsPaul Pogonyshev2008-08-111-0/+26
| | | | | | | | | | | | | | | | | | | | 2008-08-12 Paul Pogonyshev <pogonyshev@gmx.net> Bug 547354 – wrap a few memory stream methods * gio/ginputstream.override (_wrap_g_memory_input_stream_add_data): New function. * gio/gio.defs (gio.MemoryOutputStream.get_contents): Rename from get_data() to avoid name clash. * gio/goutputstream.override (_wrap_g_memory_output_stream_new) (_wrap_g_memory_output_stream_get_data): New functions. * tests/test_gio.py (TestMemoryInputStream) (TestMemoryOutputStream): New test cases. svn path=/trunk/; revision=944
* Bug 540376 – No TypeError raised when type is NonePaul Pogonyshev2008-08-111-0/+10
| | | | | | | | | | | | | 2008-08-11 Paul Pogonyshev <pogonyshev@gmx.net> Bug 540376 – No TypeError raised when type is None * gobject/gobjectmodule.c (pyg_signal_new): Add check on second argument type. * tests/test_signal.py (TestSignalCreation): New test case. svn path=/trunk/; revision=942
* Bug 547104 – improve type wrapper creationPaul Pogonyshev2008-08-111-0/+8
| | | | | | | | | | | | | 2008-08-11 Paul Pogonyshev <pogonyshev@gmx.net> Bug 547104 – improve type wrapper creation * gio/gappinfo.override (_wrap_g_app_info_tp_richcompare) (_wrap_g_app_info_tp_repr): New functions. * tests/test_gio.py (TestAppInfo.test_eq): New test. svn path=/trunk/; revision=941
* Bug 546120 – make gio.File more PythonicPaul Pogonyshev2008-08-101-1/+10
| | | | | | | | | | | | | | 2008-08-10 Paul Pogonyshev <pogonyshev@gmx.net> Bug 546120 – make gio.File more Pythonic * gio/gfile.override (_wrap_g_file_tp_richcompare) (_wrap_g_file_tp_hash, _wrap_g_file_tp_repr): New functions. * tests/test_gio.py (TestFile.test_eq, TestFile.test_hash): New tests. svn path=/trunk/; revision=939
* Bug 547067 – add File.replace_contents, replace_contents_async,Jonathan Matthew2008-08-101-0/+41
| | | | | | | | | | | | | | | 2008-08-10 Jonathan Matthew <jonathan@d14n.org> Bug 547067 – add File.replace_contents, replace_contents_async, replace_contents_finish. * gio/gfile.override: * gio/gio.defs: * tests/test_gio.py: Add overrides, docs, and tests for File.replace_contents, replace_contents_async, and replace_contents_finish. svn path=/trunk/; revision=935
* Fix to not use `use_default_fallbacks' property (it's new).Paul Pogonyshev2008-08-091-3/+8
| | | | | | | | | 2008-08-09 Paul Pogonyshev <pogonyshev@gmx.net> * tests/test_gicon.py (TestThemedIcon.test_constructor): Fix to not use `use_default_fallbacks' property (it's new). svn path=/trunk/; revision=934
* Bug 546135 – GIcon and implementations improvementsPaul Pogonyshev2008-08-091-8/+13
| | | | | | | | | | | | | | | 2008-08-09 Paul Pogonyshev <pogonyshev@gmx.net> Bug 546135 – GIcon and implementations improvements * gio/gio.defs (g_file_icon_new): Change from method of gio.File to constructor of gio.FileIcon. * tests/test_gicon.py (TestIcon.test_eq, Test_Eq.test_hash) (TestLoadableIcon.setUp): Adapt accordingly. (TestFileIcon): New test case. svn path=/trunk/; revision=933
* Bug 546591 – File.copy progress_callback does not workPaul Pogonyshev2008-08-091-0/+22
| | | | | | | | | | | | | | | | | | | | | 2008-08-09 Paul Pogonyshev <pogonyshev@gmx.net> Bug 546591 – File.copy progress_callback does not work * gio/gfile.override (file_progress_callback_marshal): Use PyObject_CallFunction() instead of PyEval_CallFunction(). Use "K" instead of "k" (the latter is not correct for 32-bit platforms). Don't free 'notify' here. (_wrap_g_file_copy): Free 'notify'. (_wrap_g_file_move): Likewise. * gio/gio.override (pygio_free_notify): New function. (async_result_callback_marshal): Use it. * tests/test_gio.py (TestFile.test_copy_progress.progress): New test. svn path=/trunk/; revision=932
* Bug 546135 – GIcon and implementations improvementsPaul Pogonyshev2008-08-093-13/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-09 Paul Pogonyshev <pogonyshev@gmx.net> Bug 546135 – GIcon and implementations improvements * gio/gio.defs (gio.LoadableIcon.load) (gio.LoadableIcon.load_async, gio.LoadableIcon.load_finish): Document. * gio/Makefile.am: * gio/gicon.override: New file: parts of 'gio.override', three methods of gio.LoadableIcon and gio.ThemedIcon constructor. * gio/gio.override: Move over all icon-related overrides to 'gicon.override'. * tests/Makefile.am: * tests/test_gicon.py: New file: parts of 'test_gio.py' and several new gio.Icon tests. * tests/test_gio.py (TestThemedIcon): Move over to 'test_gicon.py'. svn path=/trunk/; revision=931
* include test_gio.py in the testsJohan Dahlin2008-08-091-0/+1
| | | | svn path=/trunk/; revision=930
* Wrap GFile.replace_async and query_info_async with docs and test.Gian Mario Tagliaretti2008-08-031-0/+57
| | | | svn path=/trunk/; revision=923
* Wrap GFile.create_async with docs and testGian Mario Tagliaretti2008-08-021-0/+39
| | | | svn path=/trunk/; revision=920
* Wrap GFile.append_to_async with docs and testGian Mario Tagliaretti2008-08-021-0/+39
| | | | svn path=/trunk/; revision=912
* Wrap GFile.query_writable_namespaces with docs and testGian Mario Tagliaretti2008-08-011-0/+6
| | | | svn path=/trunk/; revision=909
* Wrap gio.File.moveJohan Dahlin2008-08-011-1/+29
| | | | | | | | | | | | 2008-08-02 Johan Dahlin <johan@gnome.org> * gio/gio.defs: * gio/gfile.override: * tests/test_gio.py: Wrap gio.File.move svn path=/trunk/; revision=908
* Bug 545861 – g_file_info_get_modification_time is missingJohan Dahlin2008-08-011-3/+9
| | | | | | | | | | | | | 2008-08-01 Johan Dahlin <johan@gnome.org> Bug 545861 – g_file_info_get_modification_time is missing * gio/gfileinfo.override: * gio/gio.defs: * tests/test_gio.py: Wrap, add test and documentation svn path=/trunk/; revision=905
* Bug 545846 – g_vfs_get_supported_uri_schemes is missingJohan Dahlin2008-08-011-0/+8
| | | | | | | | | | | | | | 2008-08-01 Johan Dahlin <johan@gnome.org> Bug 545846 – g_vfs_get_supported_uri_schemes is missing * gio/gio.defs: * gio/gio.override: * tests/test_gio.py: Wrap, add test and documentation svn path=/trunk/; revision=904
* Wrap new object gio.FileAttributeInfo, g_file_set_attribute and ↵Gian Mario Tagliaretti2008-07-291-1/+24
| | | | | | g_file_query_settable_attributes methods. svn path=/trunk/; revision=901
* Add a new API for registering exceptions for a GError domain. Register aJohan Dahlin2008-07-261-7/+10
| | | | | | | | | | | | | | | | | | 2008-07-26 Johan Dahlin <johan@gnome.org> * examples/gio/directory-async.py: * gio/Makefile.am: * gio/giomodule.c (init_gio): * glib/pyglib.c (pyglib_error_check), (pyglib_register_exception_for_domain): * glib/pyglib.h: * tests/test_gio.py: Add a new API for registering exceptions for a GError domain. Register a new exception for G_IO_ERROR, update tests and examples to use the new exception. svn path=/trunk/; revision=863
* Update the test tooJohan Dahlin2008-07-261-1/+1
| | | | svn path=/trunk/; revision=861
* Run pyflakes on the testsuite, remove unused imports and reorganizeJohan Dahlin2008-07-2610-65/+58
| | | | | | | | | | | | | | | | | | | | 2008-07-26 Johan Dahlin <johan@gnome.org> * tests/common.py: * tests/test_conversion.py: * tests/test_enum.py: * tests/test_interface.py: * tests/test_option.py: * tests/test_source.py: * tests/test_subprocess.py: * tests/test_subtype.py: * tests/test_thread.py: * tests/test_unknown.py: Run pyflakes on the testsuite, remove unused imports and reorganize others. svn path=/trunk/; revision=859
* Move over glib constants to gobjectJohan Dahlin2008-07-265-38/+39
| | | | | | | | | | | | | | | | | | 2008-07-26 Johan Dahlin <johan@gnome.org> * glib/glibmodule.c (pyglib_register_constants), (init_glib): * gobject/__init__.py: * gobject/gobjectmodule.c (init_gobject): Move over glib constants to gobject * tests/test_gio.py: * tests/test_mainloop.py: * tests/test_source.py: * tests/test_subprocess.py: * tests/test_thread.py: Update tests to refer to glib when appropriate svn path=/trunk/; revision=858
* Make distcheck passJohan Dahlin2008-07-251-1/+4
| | | | | | | | | | | 2008-07-25 Johan Dahlin <johan@gnome.org> * gobject/Makefile.am: * tests/Makefile.am: Make distcheck pass svn path=/trunk/; revision=854
* Wrap gio.File.copy, add tests and documentation. RenameJohan Dahlin2008-07-241-0/+31
| | | | | | | | | | | | | | | | | 2008-07-24 Johan Dahlin <johan@gnome.org> * gio/gfile.override: * gio/gfileenumerator.override: * gio/ginputstream.override: * gio/gio.defs: * gio/gio.override: * gio/goutputstream.override: * tests/test_gio.py: Wrap gio.File.copy, add tests and documentation. Rename PyGAsyncRequestNotify to PyGIONotify and reuse it. svn path=/trunk/; revision=850
* Move maincontext and mainloop over to glib. Update the threadstate api toJohan Dahlin2008-07-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-07-20 Johan Dahlin <johan@gnome.org> * glib/Makefile.am: * glib/glibmodule.c (pyglib_main_context_default), (init_glib): * glib/pyglib.c (pyglib_init), (pyglib_threads_enabled), (pyglib_main_context_new): * glib/pyglib.h: * glib/pygmaincontext.c (_wrap_g_main_context_iteration), (pyglib_maincontext_register_types): * glib/pygmaincontext.h: * glib/pygmainloop.c (pyg_signal_watch_prepare), (pyg_signal_watch_check), (pyg_main_loop_new), (_wrap_g_main_loop_get_context), (_wrap_g_main_loop_run), (pyglib_mainloop_register_types): * glib/pygmainloop.h: * gobject/Makefile.am: * gobject/__init__.py: * gobject/gobjectmodule.c (pyg_destroy_notify), (pyobject_free), (pyg_object_set_property), (pyg_object_get_property), (_pyg_signal_accumulator), (pygobject__g_instance_init), (pyg_handler_marshal), (pygobject_gil_state_ensure), (pygobject_gil_state_release), (marshal_emission_hook), (_log_func), (init_gobject): * gobject/pygboxed.c (pyg_boxed_dealloc), (pyg_boxed_new): * gobject/pygenum.c (pyg_enum_add): * gobject/pygflags.c (pyg_flags_add): * gobject/pygiochannel.c (pyg_iowatch_marshal): * gobject/pygmaincontext.c: * gobject/pygmainloop.c: * gobject/pygobject-private.h: * gobject/pygobject.c (pygobject_data_free), (pyg_toggle_notify), (pygobject_new_with_interfaces), (pygobject_weak_ref_notify): * gobject/pygobject.h: * gobject/pygoptiongroup.c (destroy_g_group), (arg_func): * gobject/pygpointer.c (pyg_pointer_new): * gobject/pygsource.c (pyg_source_get_context), (pyg_source_prepare), (pyg_source_check), (pyg_source_dispatch), (pyg_source_finalize): * gobject/pygtype.c (pyg_closure_invalidate), (pyg_closure_marshal), (pyg_signal_class_closure_marshal): * tests/common.py: Move maincontext and mainloop over to glib. Update the threadstate api to use the variant in glib. svn path=/trunk/; revision=843
* Bind gio.Mount.unmount, gio.File.mount_mountable,Johan Dahlin2008-07-191-0/+36
| | | | | | | | | | | | | | | 2008-07-19 Johan Dahlin <johan@gnome.org> * gio/gfile.override: * gio/gio.defs: * gio/gio.override: * tests/test_gio.py: Bind gio.Mount.unmount, gio.File.mount_mountable, gio.File.unmount_mountable and gio.File.mount_enclosing_volume. Add documents and tests. svn path=/trunk/; revision=837
* Wrap gio.FileEnumerator.next_files_async/next_files_done. Update theJohan Dahlin2008-07-181-0/+17
| | | | | | | | | | | | | | | 2008-07-19 Johan Dahlin <johan@gnome.org> * examples/gio/directory-async.py: * gio/gfileenumerator.override: * gio/gio.defs: * tests/test_gio.py: Wrap gio.FileEnumerator.next_files_async/next_files_done. Update the example to use them instead of the synchronous versions, add documentation and tests. svn path=/trunk/; revision=832
* Wrap gio.File.enumerate_children_async, add tests, docstring and anJohan Dahlin2008-07-181-7/+23
| | | | | | | | | | | | | | * examples/gio/directory-async.py: * gio/gfile.override: * gio/gfileenumerator.override: * gio/gio.defs: * tests/test_gio.py: Wrap gio.File.enumerate_children_async, add tests, docstring and an example. Also document gio.File.enumerate while we're at it. svn path=/trunk/; revision=828
* Make sure we can distcheck the gio module properlyJohan Dahlin2008-07-141-1/+4
| | | | | | | | | | 2008-07-15 Johan Dahlin <johan@gnome.org> * tests/Makefile.am: Make sure we can distcheck the gio module properly svn path=/trunk/; revision=808
* wrap File.load_contents_async and File.load_contents_finish with docsstrings ↵Gian Mario Tagliaretti2008-07-141-1/+19
| | | | | | and a test svn path=/trunk/; revision=802
* Bug 504337 - crash bug in gobject.Timeout and gobject.IdleJohan Dahlin2008-07-141-0/+7
| | | | | | | | | | | | | 2008-07-14 Johan Dahlin <johan@gnome.org> Bug 504337 - crash bug in gobject.Timeout and gobject.Idle * gobject/pygsource.c: * tests/test_source.py: Fix crash in Timeout and Idle, patch by Bryan Silverthorn. svn path=/trunk/; revision=799
* wrap File.load_contents with docstringsGian Mario Tagliaretti2008-07-111-0/+9
| | | | svn path=/trunk/; revision=793
* Sort out confusion between interfaces and objects, add test. Fixes #538601Johan Dahlin2008-06-171-2/+11
| | | | | | | | | | | | 2008-06-17 Johan Dahlin <jdahlin@async.com.br> * gio/gio-types.defs: * tests/test_gio.py: Sort out confusion between interfaces and objects, add test. Fixes #538601 svn path=/trunk/; revision=788
* Set gobject.GObject.__module__ to gobject._gobject, this helps pylint toJohan Dahlin2008-04-152-0/+13
| | | | | | | | | | | | | | | | | 2008-04-15 Johan Dahlin <johan@gnome.org> * gobject/gobjectmodule.c (init_gobject): Set gobject.GObject.__module__ to gobject._gobject, this helps pylint to check public methods of GObject subclasses * tests/Makefile.am (tests): * tests/test_gobject.py (TestGObjectAPI.testGObjectModule): Add a test for this (#523821, Simon Schampijer) svn path=/trunk/; revision=777
* test TypeError of read_async/write_async properlyJohan Dahlin2008-04-111-0/+33
| | | | svn path=/trunk/; revision=774
* Move around the order of the callback argument to async methods, so itJohan Dahlin2008-04-111-8/+8
| | | | | | | | | | | | | | | 2008-04-11 Johan Dahlin <jdahlin@async.com.br> * gio/gfile.override: * gio/ginputstream.override: * gio/goutputstream.override: * tests/test_gio.py: Move around the order of the callback argument to async methods, so it comes before priority and cancellable, which can have default values. svn path=/trunk/; revision=773
* Implement GAppInfo constructor, add tests.Johan Dahlin2008-04-081-8/+18
| | | | | | | | | | | | | | | 2008-04-08 Johan Dahlin <jdahlin@async.com.br> * gio/Makefile.am: * gio/__init__.py: * gio/gappinfo.override: * gio/gio.defs: * gio/gio.override: * tests/test_gio.py: Implement GAppInfo constructor, add tests. svn path=/trunk/; revision=772
* Wrap GFileInfo.list_attributes(), add tests and set the default ofJohan Dahlin2008-04-081-0/+9
| | | | | | | | | | | | | | | 2008-04-08 Johan Dahlin <jdahlin@async.com.br> * gio/Makefile.am: * gio/gfileinfo.override: * gio/gio.defs: * gio/gio.override: * tests/test_gio.py: Wrap GFileInfo.list_attributes(), add tests and set the default of GFileQueryInfoFlags args to G_FILE_QUERY_INFO_NONE. svn path=/trunk/; revision=771
* Fix a typo Update the tests after the latest "refactoring". The testsuiteJohan Dahlin2008-04-081-0/+7
| | | | | | | | | | | | 2008-04-08 Johan Dahlin <jdahlin@async.com.br> * gobject/option.py: Fix a typo * tests/test_option.py: Update the tests after the latest "refactoring". The testsuite should run fine now again, finally. svn path=/trunk/; revision=770
* Disable these tests until we can figure why they freeze during make check.Johan Dahlin2008-04-081-2/+4
| | | | | | | | | | | | 2008-04-08 Johan Dahlin <johan@gnome.org> * tests/test_gio.py (TestOutputStream.testWriteAsyncError): (TestInputStream._testCloseAsync.callback): Disable these tests until we can figure why they freeze during make check. svn path=/trunk/; revision=769
* Add bindings for content_type_guess. Based on patch by Thomas LeonardJohan Dahlin2008-04-081-0/+15
| | | | | | | | | | | | | 2008-04-08 Johan Dahlin <jdahlin@async.com.br> * gio/gio.defs: * gio/gio.override: * tests/test_gio.py: Add bindings for content_type_guess. Based on patch by Thomas Leonard (#525113) svn path=/trunk/; revision=768
* Add basic support for GThemedIcon, based on patch by Thomas LeonardJohan Dahlin2008-04-081-0/+13
| | | | | | | | | | | | | | 2008-04-08 Johan Dahlin <jdahlin@async.com.br> * gio/gio-types.defs: * gio/gio.defs: * gio/gio.override: * tests/test_gio.py: Add basic support for GThemedIcon, based on patch by Thomas Leonard (#521883) svn path=/trunk/; revision=767
* Unbreak Source.prepare (#523075, Bryan Silverthorn)Johan Dahlin2008-04-081-0/+28
| | | | | | | | | | | 2008-04-08 Johan Dahlin <jdahlin@async.com.br> * gobject/pygsource.c: * tests/test_source.py: Unbreak Source.prepare (#523075, Bryan Silverthorn) svn path=/trunk/; revision=766
* Make gio.File() (calling on an interface) a factory for creating files.Johan Dahlin2008-04-071-0/+19
| | | | | | | | | | | | | | | 2008-04-07 Johan Dahlin <johan@gnome.org> * gio/__init__.py: * gio/gfile.override: * gio/gio-types.defs: * gio/gio.override: * tests/test_gio.py: Make gio.File() (calling on an interface) a factory for creating files. Add tests and a docstring. svn path=/trunk/; revision=764
* Add tests for recently added features.Johan Dahlin2008-04-061-9/+61
| | | | | | | | | 2008-04-06 Johan Dahlin <johan@gnome.org> * tests/test_gio.py: Add tests for recently added features. svn path=/trunk/; revision=762
* bug #428732 (pyg_enum_new): Fix two wrong assertions aboutPaul Pogonyshev2008-04-021-0/+9
| | | | | | | | | | | | 2008-04-02 Paul Pogonyshev <pogonyshev@gmx.net> * gobject/pygenum.c: bug #428732 (pyg_enum_new): Fix two wrong assertions about '__enum_values__' size and contents. (pyg_enum_reduce): New function (based on patch by Phil Dumont). (pyg_enum_methods): Hook it up. svn path=/trunk/; revision=756
* Make read_finish() return the string, remove the get_buffer method. ThisJohan Dahlin2008-03-221-4/+2
| | | | | | | | | | | | | | | | 2008-03-22 Johan Dahlin <johan@gnome.org> * gio/ginputstream.override: * gio/gio.override: * tests/test_gio.py: Make read_finish() return the string, remove the get_buffer method. This is more pythonic, as it mimics the normal read() behavior of python. Update the tests and use a separate marshaller for read. svn path=/trunk/; revision=753
* Allow gobject.property work with subclasses. Add tests.Johan Dahlin2008-03-211-0/+35
| | | | | | | | | | | | | 2008-03-21 Johan Dahlin <johan@gnome.org> * gobject/__init__.py: * tests/test_properties.py: Allow gobject.property work with subclasses. Add tests. (#523352, Tomeu Vizoso) svn path=/trunk/; revision=752
* Update to SVN of gio: g_file_contains_file -> g_file_has_prefix can_seekJohan Dahlin2008-03-091-0/+16
| | | | | | | | | | | | | | | | | 2008-03-09 Johan Dahlin <johan@gnome.org> * gio/gio-types.defs: * gio/gio.defs: * tests/test_gio.py: Update to SVN of gio: g_file_contains_file -> g_file_has_prefix can_seek and can_truncate are now only on the GSeekable interface Add tests (#521207, Thomas Leonard) svn path=/trunk/; revision=750
* Don't assume the buffer is set, use Py_XINCREF instead of Py_INCREF.Johan Dahlin2008-01-211-11/+42
| | | | | | | | | | | | | | | | | | | | 2008-01-21 Johan Dahlin <johan@gnome.org> * gio/gio.override (async_result_callback_marshal): Don't assume the buffer is set, use Py_XINCREF instead of Py_INCREF. * gio/Makefile.am: * gio/ginputstream.override: * gio/goutputstream.override: * gio/gvolumemonitor.override: * gio/gfile.override: * tests/test_gio.py: Implement and test GFile.read_async. Use try/finally to always quit the mainloop, even if the test fail. Update source comment headers. svn path=/trunk/; revision=744