summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Imports test_girepository.py from former PyBank's everything_unittest.py.Simon van der Linden2009-06-081-0/+288
|
* Wrap gio.FileOutputStream.query_info_asyncGian Mario Tagliaretti2009-06-021-0/+27
| | | | | Add the wrapper for gio.FileOutputStream.query_info_async including docs and a test.
* Wrap gio.FileInputStream.query_asyncGian Mario Tagliaretti2009-06-011-0/+27
| | | | | Add the wrapper for gio.FileInputStream.query_async including docs and a test.
* Wrap gio.DataInputStream.read_line_async and read_until_asyncPaul Pogonyshev2009-05-311-5/+46
| | | | | | | Wrap the functions and their corresponding *_finish() functions. Create 'gdatainputstream.override' for these and move two existing functions there. Add unit tests. Re-enable synchronous read_line unit test and adjust it for new official GIO behavior. Bug #584285.
* Code maintenance: ignore one more file created by unit testsPaul Pogonyshev2009-05-271-0/+1
|
* Wrap gio.OutputStream.splice_async()Gian Mario Tagliaretti2009-05-241-0/+20
| | | | wrap gio.OutputStream.splice_async() and add a test.
* Wrap gio.OutputStream.flush_async()Gian Mario Tagliaretti2009-05-241-0/+11
| | | | wrap gio.OutputStream.flush_async() and add a test.
* Wrap gio.InputStream.skip_async()Gian Mario Tagliaretti2009-05-051-0/+20
| | | | wrap gio.InputStream.skip_async() and add a test.
* Fix occasional build failures after the 'ltihooks.py' removalPaul Pogonyshev2009-04-291-1/+1
| | | | | Simply amend all related symbolic link creation so that any errors are ignored.
* Swap first two arguments of gio.File.query_info_async()Paul Pogonyshev2009-04-281-1/+1
| | | | | | | Swap the arguments for consistency with other methods. Update documentation accordingly. Take care to keep the old code (i.e. with non-swapped calling arguments) working, but don't mention that anywhere. (Bug #580490.)
* Code maintenance: ignore unit test result filePaul Pogonyshev2009-04-281-0/+1
|
* Remove 'ltihooks.py' as using deprecated Python module.Paul Pogonyshev2009-04-182-5/+7
| | | | | | | Remove the script and all related imports. All relevant Makefile's now create symbolic links for '.so' files from '.libs' to the level up, so that C helper modules are still importable in built, but not installed source tree.
* Wrap new GFile method.Gian Mario Tagliaretti2009-04-051-0/+16
| | | | | | | | | | | | 2009-04-05 Gian Mario Tagliaretti <gianmt@gnome.org> * gio/gfile.override: (_wrap_g_file_set_display_name_async) Wrap new GFile method. * tests/test_gio.py: Test the above methods. svn path=/trunk/; revision=1056
* Bug 577999 – converting a negative long Python value to a GUINT64 GValue ↵Gustavo J. A. M. Carneiro2009-04-051-0/+3
| | | | | | doesn't error out as it should svn path=/trunk/; revision=1054
* Wrap new GFile methods.Gian Mario Tagliaretti2009-04-041-0/+18
| | | | | | | | | | | | | 2009-04-04 Gian Mario Tagliaretti <gianmt@gnome.org> * gio/gfile.override: (_wrap_g_file_set_attributes_async) (_wrap_g_file_set_attributes_finish) Wrap new GFile methods. * tests/test_gio.py: Test the above methods. svn path=/trunk/; revision=1053
* add a couple of convinence functions to convert from/to a python list andGian Mario Tagliaretti2009-03-281-1/+17
| | | | | | | | | | | | | | | | | | | | | | 2009-03-28 Gian Mario Tagliaretti <gianmt@gnome.org> * gio/pygio-utils.[hc]: (strv_to_pylist) (pylist_to_strv) add a couple of convinence functions to convert from/to a python list and an array of strings. * gio/Makefile.am * gio/gdrive.override: * gio/gio.override: Strip GDrive overrides and wrap g_drive_enumerate_identifiers * tests/test_gio.py: * gio/gvolume.override: wrap g_volume_enumerate_identifiers * gio/gio.defs: add missing g_drive_get_identifier and g_drive_enumerate_identifiers svn path=/trunk/; revision=1035
* Bug 559001 – Allow setting pytype wrapper classmarklee2009-03-221-0/+19
| | | | | | | | | | | | initial patch by: John Ehresman <jpe@wingware.com> * gobject/pygtype.c (_wrap_g_type_wrapper__set_pytype): New function. * tests/test_gtype.py (GTypeTest.assertPyType), (GTypeTest.setInvalidPyType), (GTypeTest.testPyType), (GTypeTest.testInvalidPyType): Two new testcases to test the above, with accompanying helper methods. svn path=/trunk/; revision=1030
* gio/gfileenumerator.override (_wrap_g_file_enumerator_close_async) wrapGian Mario Tagliaretti2009-03-221-0/+15
| | | | | | | | | | | | | 2009-03-22 Gian Mario Tagliaretti <gianmt@gnome.org> * gio/gfileenumerator.override (_wrap_g_file_enumerator_close_async) wrap new method. * tests/test_gio.py (TestGFileEnumerator.testCloseFilesAsync): Test the above. svn path=/trunk/; revision=1027
* Bug 566571 – gtk.Buildable interface method override is not recognizedPaul Pogonyshev2009-01-141-0/+17
| | | | | | | | | | | | | | | | 2009-01-14 Paul Pogonyshev <pogonyshev@gmx.net> Bug 566571 – gtk.Buildable interface method override is not recognized * gobject/gobjectmodule.c (pyg_type_add_interfaces): New function, break out code repetition out of pyg_type_register(). * tests/test_subtype.py (TestSubType.test_gtk_buildable_virtual_method): New test case (inactive). svn path=/trunk/; revision=997
* Bug 566706 – cleanup GIO overridesPaul Pogonyshev2009-01-141-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-01-14 Paul Pogonyshev <pogonyshev@gmx.net> Bug 566706 – cleanup GIO overrides * gio/gio.override (pygio_notify_new) (pygio_notify_using_optional_callback) (pygio_notify_callback_is_valid_full) (pygio_notify_callback_is_valid) (pygio_notify_reference_callback): New functions. (pygio_notify_free): Rename from pygio_free_notify() and extend. (async_result_callback_marshal): Warn if new `referenced' field is not set (programming error). (_wrap_g_drive_eject, _wrap_g_drive_poll_for_media) (_wrap_g_mount_unmount, _wrap_g_mount_eject) (_wrap_g_mount_remount): Lots of cleanup: use new functions instead of repeating code, unify and fix error handling. * gio/gfile.override (_wrap_g_file_read_async) (_wrap_g_file_load_contents_async) (_wrap_g_file_enumerate_children_async) (_wrap_g_file_mount_mountable, _wrap_g_file_unmount_mountable) (_wrap_g_file_mount_enclosing_volume, _wrap_g_file_copy) (_wrap_g_file_copy_async, _wrap_g_file_move) (_wrap_g_file_append_to_async, _wrap_g_file_create_async) (_wrap_g_file_replace_async, _wrap_g_file_query_info_async) (_wrap_g_file_replace_contents_async): Similar cleanup. * gio/gfileenumerator.override (_wrap_g_file_enumerator_next_files_async): Similar cleanup. * gio/gicon.override (_wrap_g_loadable_icon_load_async): Similar cleanup. * gio/ginputstream.override (_wrap_g_input_stream_close_async): Similar cleanup. * gio/goutputstream.override (_wrap_g_output_stream_write_async) (_wrap_g_output_stream_close_async): Similar cleanup. * gio/gvolume.override (_wrap_g_volume_mount) (_wrap_g_volume_eject): Similar cleanup. * tests/test_gio.py (TestFile.test_copy_async): Fix the test. svn path=/trunk/; revision=996
* Bad -I ordering can break build fixes #566737Gian Mario Tagliaretti2009-01-061-2/+2
| | | | svn path=/trunk/; revision=993
* Define methods.Mads Chr. Olesen2009-01-041-0/+25
| | | | | | | | | | | | | 2009-01-04 Mads Chr. Olesen <gnome-bugzilla@shiyee.dk> * gio/gio.defs (gio.File.copy_async, gio.File.copy_finish): Define methods. * gio/gfile.override (_wrap_g_file_copy_async): New function. * tests/test_gio.py (TestFile.test_copy_async): Test the methods. svn path=/trunk/; revision=990
* Rename from read(), document. (gio.InputStream.read): Rename fromPaul Pogonyshev2008-08-271-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | 2008-08-28 Paul Pogonyshev <pogonyshev@gmx.net> * gio/gio.defs (gio.InputStream.read_part): Rename from read(), document. (gio.InputStream.read): Rename from read_all(), document. (gio.OutputStream.write_part): Rename from write(), document. (gio.OutputStream.write): Rename from write_all(), document. * gio/ginputstream.override (_wrap_g_input_stream_read): Fix several bugs. (_wrap_g_input_stream_read_all): New function. * gio/goutputstream.override (_wrap_g_output_stream_write_all): New function. * tests/test_gio.py (TestInputStream.testRead): Add more tests. (TestInputStream.test_read_part): New test. (TestInputStream._read_in_loop): New helper method. (TestOutputStream.test_write_part): New test. svn path=/trunk/; revision=950
* Bug 547484 – wrap gio.DataInputStream.read_line and ...read_untilPaul Pogonyshev2008-08-121-0/+21
| | | | | | | | | | | | | 2008-08-12 Paul Pogonyshev <pogonyshev@gmx.net> Bug 547484 – wrap gio.DataInputStream.read_line and ...read_until * tests/test_gio.py (TestDataInputStream): New test case. * gio/ginputstream.override (_wrap_g_data_input_stream_read_line) (_wrap_g_data_input_stream_read_until): New functions. svn path=/trunk/; revision=946
* 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