summaryrefslogtreecommitdiff
path: root/tests/test_overrides_gdk.py
Commit message (Collapse)AuthorAgeFilesLines
* Add (in)equality tests for Gdk.{Color,RGBA}Mazhar Hussain2023-03-281-0/+8
|
* tests: Remove usage of some deprecated unittest methodsChristoph Reiter2020-11-071-2/+2
|
* Add a test scroll event attr mappingChristoph Reiter2020-04-171-0/+5
|
* tests: GDK_RELEASE_MASK has been removed from GTK4Jean Felder2020-04-171-8/+10
| | | | See gtk commit 2244eeb7270f5a0b351aae98c19ddbc4d4b5bea7.
* Remove all Python 2 Python codeChristoph Reiter2020-04-151-2/+0
|
* tests: add a test for stripping return values from event methods. Fixes #85Christoph Reiter2019-01-191-0/+10
| | | | | | | | As pointed out in #85 we don't use strip_boolean_result() for the main Gdk.Event struct while we do for the member structs. But at this point int time I'm afraid that changing it will break existing code, so just add some tests to document the difference and make sure it doesn't change.
* tests: handle the cursor type changing to pixmap as happens on macOSChristoph Reiter2018-11-271-1/+3
|
* tests: gdk overrides: silence a deprecation warningChristoph Reiter2018-11-231-1/+2
|
* gdk overrides: improve coverage and remove overrides for GDK4Christoph Reiter2018-11-191-13/+80
| | | | | Take the chance and get rid of it. If someone misses them we can look into adding some of it back.
* tests: Make tests run with GTK4Christoph Reiter2018-11-041-0/+4
| | | | | | | This contains the minimum changes needed to get the tests to pass using our docker image which contains a build gtk master from today. This also makes the gtk4 CI job fatal so we don't regress in this area.
* tests: Make it possible to use pytest directlywip/creiter/pytest-directChristoph Reiter2018-02-121-1/+3
| | | | | | | | | | | pytest will just import the files passed to it and try to run tests. Since we need to run some setup code convert the tests directory to a Python package and do the initialization in __init__.py. This makes the init code (env vars, typelib search path, dbus) always run when something from the package gets imported. python3 setup.py build_tests # build pygobject and tests py.test-3 tests/test_gi.py # run tests in test_gi.py only
* tests: Make tests run without Gtk/Gdk installedMikhail Fludkov2018-02-081-8/+9
| | | | | | Python evaluates the code inside @unittest.skipIf decorator during import time. Because Gtk is not installed it crashes while evaluating 'Gtk._version' where Gtk=None.
* tests: Make test suite run with GTK+ 4Christoph Reiter2017-04-021-0/+7
| | | | | | | Skip various tests which test things that are no longer available with gtk4. Does not remove any deprecated overrides. Disable gtk4 support in pygtkcompat. The porting path over gtk3 should be enough.
* tests: avoid mapping a GtkWindowChristoph Reiter2017-04-011-1/+2
| | | | | | This let to a window being shown when running the test suite. https://bugzilla.gnome.org/show_bug.cgi?id=780812
* tests: Make test suite run on WindowsChristoph Reiter2017-03-241-1/+2
| | | | | | | | | | | | (in a msys2 environment) * Replace LD_LIBRARY_PATH with gir code in runtests.py * Remove unneeded runtests-windows.py * Unset MSYSTEM to disable path separator hacks by msys2 * Set sys.path in runtests.py * Skip various tests failing/hanging/crashing on Windows https://bugzilla.gnome.org/show_bug.cgi?id=780396
* tests: Make test suite run on macOSChristoph Reiter2017-03-241-0/+3
| | | | | | | * Skip all tests which fail, crash or hang. * Disable D-Bus in case dbus-run-session is not available. https://bugzilla.gnome.org/show_bug.cgi?id=780396
* enum/flags: use gir info for type names and __repr__ instead of the gtype nameChristoph Reiter2015-10-271-3/+3
| | | | | | | For example __name__ is now SpawnFlags instead of PyGLibSpawnFlags and __repr__ shows GLib.SpawnFlags in stead of PyGLibSpawnFlags. https://bugzilla.gnome.org/show_bug.cgi?id=657915
* Fix Gdk.rectangle_intersect/rectangle_union missing with GTK+ 3.18Christoph Reiter2015-10-111-0/+9
| | | | | | | | | 3.18 added a Gdk.Rectangle type which changed these functions to methods in the gir. Fix by providing aliases in the Gdk overrides. https://bugzilla.gnome.org/show_bug.cgi?id=756364
* tests: Silence various error messages and warnings.Christoph Reiter2015-07-021-7/+11
| | | | | | | | | | | | | | This silences glib warnings which are due to testing of error handling, deprecation warnings which we ignore since we want to continue testing deprecated code and other error output of code which is supposed to fail. To reduce code duplication and make things easier this introduces a shared helper module containing various context managers and decorators which allow testing and silencing of warnings and errors. https://bugzilla.gnome.org/show_bug.cgi?id=751156
* overrides: Add Gdk.EventTouch union discriminationSimon Feltman2015-01-241-0/+12
| | | | | | | | | Add EventTouch to get/setattr pass-through to support BEGIN, UPDATE, END, and CANCEL touch event types. Ensure Gdk.Event methods get_state(), get_axis(), get_coords(), and get_root_coords() are patched onto Gdk.EventTouch. https://bugzilla.gnome.org/show_bug.cgi?id=736380
* Gdk.Event: Override __setattr__ to set fields based on the event typeChristoph Reiter2014-04-141-3/+10
| | | | | | | Pass the setting of attributes through to the underlying union based on event type. This mirrors the logic in __getattr__. https://bugzilla.gnome.org/show_bug.cgi?id=727810
* Gdk.Event: Include GdkEventType in __repr__Christoph Reiter2014-04-141-0/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=727810
* overrides: Fix __repr__ for various Gdk structsSimon Feltman2014-01-071-0/+9
| | | | | | Change __repr__ overrides for Gdk.Color, Gdk.RGBA, and Gdk.Atom to return a string reprentation that is valid Python given an expected environment. See: http://docs.python.org/2/reference/datamodel.html#object.__repr__
* Deprecate Gdk.Cursor constructor dispatchingSimon Feltman2013-11-121-4/+13
| | | | | | | | | Give deprecation warning for the overridden __new__ method on Gdk.Cursor when more than one argument is used. Recommend using Gdk.Cursor.new_for_display, new_from_pixbuf, and new_from_pixmap instead. https://bugzilla.gnome.org/show_bug.cgi?id=705810
* Add some tests for overridden Gdk/Gtk functionsMartin Pitt2013-03-011-0/+7
| | | | | Add tests for Gtk.main_quit, Gtk.stock_parse(), and Gdk.color_parse(), as we have overrides for them.
* Fix signedness, overflow checking, and 32 bit overflow of GFlagsMartin Pitt2013-02-271-0/+15
| | | | | | | | | | | | | | GFlagsValue.value is a guint, so we must access it as unsigned type. Define two new macros PYGLIB_PyLong_FromUnsignedLong() and PYGLIB_PyLong_AsUnsignedLong() for that purpose, and consistently use them for handling flag values. Use the checked variant of these functions which produce OverflowErrors instead of the unchecked PYGLIB_PyLong_AS_LONG(). Insert zero padding after the PyLongObject in PyGFlags and PyGEnum. Without this, the directly adjacent GType field seems to confuse PyLong_FromUnsignedLong() and includes the GType into the numeric value. https://bugzilla.gnome.org/show_bug.cgi?id=693121
* Split test_overrides.pyMartin Pitt2012-09-031-0/+119
Split the huge test_overrides.py into separate files for gdk, gtk, gio, glib, and pango. Further split the monolithic classes for Gtk and Gio into several ones. https://bugzilla.gnome.org/show_bug.cgi?id=683188