summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* New testJohan Dahlin2008-01-201-0/+16
| | | | | | | | | 2008-01-20 Johan Dahlin <johan@gnome.org> * tests/test_gio.py (TestVolumeMonitor): New test svn path=/trunk/; revision=743
* Reuse file descriptor for reading and writing. Avoid unnecessary flush()Johan Dahlin2008-01-201-5/+3
| | | | svn path=/trunk/; revision=742
* Add a new method, to fetch the buffer (_wrap_g_input_stream_read_async):Johan Dahlin2008-01-201-1/+3
| | | | | | | | | | | | | 2008-01-20 Johan Dahlin <johan@gnome.org> * gio/gio.override (_wrap_g_simple_async_result_get_buffer): Add a new method, to fetch the buffer (_wrap_g_input_stream_read_async): Save a reference to the buffer. * tests/test_gio.py (TestInputStream.testReadAsync.callback): Check the content svn path=/trunk/; revision=740
* New function to test error condition of async read.Johan Dahlin2008-01-201-1/+20
| | | | | | | | | | | | | 2008-01-20 Johan Dahlin <johan@gnome.org> * tests/test_gio.py (TestInputStream.testReadAsyncError): New function to test error condition of async read. * gio/gio.override (async_result_callback_marshal): Grab a reference to callback/data. svn path=/trunk/; revision=739
* Reorganize tests and make them test more useful thingsJohan Dahlin2008-01-201-11/+12
| | | | svn path=/trunk/; revision=738
* Impl.Johan Dahlin2008-01-192-0/+51
| | | | | | | | | | | | | | | | 2008-01-19 Johan Dahlin <johan@gnome.org> * gio/gio.override (_wrap_g_output_stream_write): Impl. * gio/gio.override: * gio/unix.defs: Add GUnixInputStream type and methods * tests/common.py: * tests/test_gio.py: Add GIO tests. svn path=/trunk/; revision=737
* Set the default value of old_args to 0, so we don't end up slicing withJohan Dahlin2007-11-121-0/+3
| | | | | | | | | | | 2007-11-12 Johan Dahlin <johan@gnome.org> * gobject/option.py (OptionParser.parse_args): Set the default value of old_args to 0, so we don't end up slicing with None. Fixes #496278 (Vincent Untz) svn path=/trunk/; revision=718
* Merge in values from all groups to the global option group. Slice up argsJohan Dahlin2007-11-061-34/+55
| | | | | | | | | | | | | | 2007-11-06 Johan Dahlin <johan@gnome.org> * gobject/option.py (OptionParser.parse_args): Merge in values from all groups to the global option group. Slice up args so it doesn't return too much. * tests/test_option.py: Refactor to be unittesty, Add new tests to test what options returns. svn path=/trunk/; revision=717
* Remove trailing whitespaceJohan Dahlin2007-11-061-7/+7
| | | | svn path=/trunk/; revision=715
* Refactor a bit to make sure that it is possible to use in subclasses,Johan Dahlin2007-08-271-0/+14
| | | | | | | | | | | 2007-08-27 Johan Dahlin <jdahlin@async.com.br> * gobject/__init__.py (GObjectMeta._install_properties): Refactor a bit to make sure that it is possible to use in subclasses, fixes #470718 (Marco Giusti) svn path=/trunk/; revision=699
* Bug 470230 – check for default value in boolean type is wrongGustavo J. A. M. Carneiro2007-08-271-1/+13
| | | | svn path=/trunk/; revision=698
* removed unwanted definesGustavo J. A. M. Carneiro2007-08-271-2/+1
| | | | svn path=/trunk/; revision=697
* Add test case for one the problems reported in bug #466082Gustavo J. A. M. Carneiro2007-08-131-0/+8
| | | | svn path=/trunk/; revision=693
* Bug 342948 – Add exception handling to GOptionGustavo J. A. M. Carneiro2007-07-071-1/+42
| | | | svn path=/trunk/; revision=681
* Bug 351072 – Cannot handle signals with parameter type G_TYPE_VALUE ↵Gustavo J. A. M. Carneiro2007-07-072-0/+24
| | | | | | (marshal/unmarshal for GValue-wrapped GValue) svn path=/trunk/; revision=680
* reviewed by: Johan DahlinSebastian Granjoux2007-07-022-0/+40
| | | | | | | | | | | | | | | 2007-07-02 Sebastian Granjoux <seb.sfo@free.fr> reviewed by: Johan Dahlin * gobject/gobjectmodule.c: (pyg_gerror_exception_check): * tests/test_gtype.py: * tests/testhelpermodule.c: (_wrap_test_gerror_exception): Fix a bug in pyg_error_exception_check, add a test, Fixes #449879 svn path=/trunk/; revision=678
* Bug 447271 – gobject has a weird bug on mac. Involves python, property and ↵Gustavo J. A. M. Carneiro2007-06-171-0/+12
| | | | | | subclassing svn path=/trunk/; revision=677
* Support type=GObject or type=TYPE_OBJECT in the new properties API.Gustavo J. A. M. Carneiro2007-06-161-0/+14
| | | | svn path=/trunk/; revision=675
* Bug 339924 – gnome-python doesn't compile on opensolarisGustavo J. A. M. Carneiro2007-05-091-1/+2
| | | | svn path=/trunk/; revision=672
* Store property values in the descriptor per instance, add a test.Johan Dahlin2007-05-021-0/+12
| | | | | | | | | | * gobject/propertyhelper.py: * tests/test_properties.py: Store property values in the descriptor per instance, add a test. svn path=/trunk/; revision=665
* Add a property helper, fixes #338098Johan Dahlin2007-05-014-67/+135
| | | | | | | | | | | | | | | | | * examples/properties.py: * gobject/Makefile.am: * gobject/__init__.py: * gobject/constants.py.in: * gobject/generate-constants.c: (main): * gobject/propertyhelper.py: * tests/Makefile.am: * tests/test_enum.py: * tests/test_interface.py: * tests/test_properties.py: Add a property helper, fixes #338098 svn path=/trunk/; revision=662
* fix GSlice thread init warningGustavo J. A. M. Carneiro2007-04-302-2/+2
| | | | svn path=/trunk/; revision=660
* Remove whitespace, add a bug referenceJohan Dahlin2007-04-301-3/+4
| | | | svn path=/trunk/; revision=659
* fix descriptor / toggle_ref interaction bugGustavo J. A. M. Carneiro2007-04-301-0/+12
| | | | svn path=/trunk/; revision=658
* reviewed by: Johan Dahlin <johan@gnome.org>James Livingstone2007-04-301-0/+15
| | | | | | | | | | | | | | | | 2007-04-29 James Livingstone <doclivingstone@gmail.com> reviewed by: Johan Dahlin <johan@gnome.org> * gobject/pygtype.c: (pyg_value_from_pyobject): * tests/test_signal.py: Add a missing else to avoid throwing a TypeError. Includes a test written by Ed Catmur. Fixes #374653 svn path=/trunk/; revision=657
* Treat None in a GValueArray as pointer/NULL, patch by Ed Catmur, fixesJohan Dahlin2007-04-302-1/+28
| | | | | | | | | | | | | | 2007-04-29 Johan Dahlin <johan@gnome.org> * gobject/pygtype.c: (pyg_value_array_from_pyobject): * tests/test_gtype.py: * tests/testhelpermodule.c: (_wrap_test_value_array): Treat None in a GValueArray as pointer/NULL, patch by Ed Catmur, fixes #352209. svn path=/trunk/; revision=656
* reviewed by: Johan Dahlin <johan@gnome.org>Damien Carbery2007-04-301-1/+1
| | | | | | | | | | | | | 2007-04-29 Damien Carbery <damien.carbery@sun.com> reviewed by: Johan Dahlin <johan@gnome.org> * tests/test-unknown.c: (test_interface_iface_method): Do not return in a void function, fixes #385127 svn path=/trunk/; revision=654
* Add a generic CClosure marshaller based on ffi. This makes it possible toJohan Dahlin2007-04-292-10/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | 2007-04-29 Johan Dahlin <jdahlin@async.com.br> * README: * configure.ac: * gobject/Makefile.am: * gobject/ffi-marshaller.c: (g_value_to_ffi_type), (g_value_from_ffi_type), (g_cclosure_marshal_generic_ffi): * gobject/ffi-marshaller.h: * gobject/gobjectmodule.c: (create_signal), (init_gobject): * pygobject-2.0.pc.in: * tests/test_signal.py: * tests/testhelpermodule.c: (test1_callback), (test1_callback_swapped), (test2_callback), (test3_callback), (test4_callback), (test_float_callback), (test_double_callback), (test_string_callback), (test_object_callback), (connectcallbacks), (_wrap_connectcallbacks), (inittesthelper): Add a generic CClosure marshaller based on ffi. This makes it possible to connect to signals on PyGObjects from C. libffi is now an optional dependency Fixes #353816 (Edward Hervey) svn path=/trunk/; revision=651
* Unit test for get/set_properties.Gustavo J. A. M. Carneiro2007-04-231-0/+8
| | | | svn path=/trunk/; revision=647
* Bug 320428 – Break PyGObject<->GObject reference cycleGustavo J. A. M. Carneiro2007-04-141-1/+185
| | | | svn path=/trunk/; revision=642
* Remove .cvsignore archivesJohan Dahlin2007-01-161-3/+0
| | | | svn path=/trunk/; revision=636
* Make sure an exception is raised when we pass in invalid arguments to theJohan Dahlin2006-11-181-1/+4
| | | | | | | * gobject/pygoptiongroup.c (pyg_option_group_dealloc): * tests/test_option.py (TestOption.testBadConstructor): Make sure an exception is raised when we pass in invalid arguments to the optiongroup constructor, add a test. #364576 (Laszlo Pandy)
* reviewed by: Johan Dahlin <johan@gnome.org>Yevgen Muntyan2006-11-181-1/+73
| | | | | | | | | | | | | 2006-11-18 Yevgen Muntyan <muntyan@tamu.edu> reviewed by: Johan Dahlin <johan@gnome.org> * gobject/gobjectmodule.c: (create_property): * gobject/pygparamspec.c: (pyg_param_spec_getattr): * tests/test_properties.py: Avoid truncating in pyg_param_spec_getattr, add test for all non-float numeric types. Fixes #353943
* Use PyObject_Cmp instead of comparing function closure addresses, whichJohan Dahlin2006-11-181-10/+17
| | | | | | * gobject/pygtype.c (gclosure_from_pyfunc): Use PyObject_Cmp instead of comparing function closure addresses, which makes it possible to use any callable and not just functions. Fixes #375589 (Dima)
* Add a test for #375589Johan Dahlin2006-11-181-0/+10
|
* some more emission hook testsGustavo J. A. M. Carneiro2006-09-161-0/+45
|
* interface fixes and testsGustavo J. A. M. Carneiro2006-08-272-3/+89
|
* Bug 353039 – Failure in signal emission during do_set_property invoked ↵Gustavo J. A. M. Carneiro2006-08-271-1/+29
| | | | from constructor
* Remove printJohan Dahlin2006-08-211-1/+0
|
* Add Interface implementation testJohan Dahlin2006-07-105-10/+296
|
* Bindings for g_filename_display_basename and g_filename_display_name;Gustavo J. A. M. Carneiro2006-06-241-0/+16
| | | | Add support for G_TYPE_GSTRING, at least in signals.