summaryrefslogtreecommitdiff
path: root/test/test-service.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove support for Python 2Simon McVittie2021-09-151-7/+2
| | | | | | | | Python 2 reached EOL on 2020-01-01, and the latest version of AX_PYTHON_DEVEL breaks the build with Python 2. This seems as good a time as any to drop compatibility. Signed-off-by: Simon McVittie <smcv@collabora.com>
* tests: Use gi.repository.GLib to avoid deprecation warningsSimon McVittie2020-11-231-5/+5
| | | | | | | Back in the days of PyGTK, there was only the gobject module, containing bindings for both GLib and GObject. This is no longer the case. Signed-off-by: Simon McVittie <smcv@collabora.com>
* Add a test for NO_REPLY method callsSimon McVittie2019-09-021-0/+24
| | | | | | See https://gitlab.freedesktop.org/dbus/dbus-python/issues/26 Signed-off-by: Simon McVittie <smcv@collabora.com>
* test-p2p: Add test coverage for sending and receiving fdsSimon McVittie2019-09-021-0/+8
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Add clearer licensing information in SPDX formatSimon McVittie2019-07-151-0/+2
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Avoid using async keywordSimon McVittie2018-01-291-2/+2
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Use non-recursive make for tests, and make them into installed-testsSimon McVittie2016-01-201-6/+21
|
* Rename gobject_service (PyGI version) to gi_serviceSimon McVittie2012-05-021-5/+5
| | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=48904
* More Python 3 porting, this time primarily to get test-client.py working.Barry Warsaw2011-12-161-16/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | Changes include: - DBusException.get_dbus_message(): In Python 3, the str of the exception will already be a unicode, so don't try to decode it unless it's a bytes object (a.k.a. 8-bit str in Python 2). - gobject_service.py: Switch to pygi and rewrite the metaclass instantiation code to be portable between Python 2 and Python 3. - run-test.sh: echo a few more useful environment variables - test-client.py: - Globally replace deprecated assertEquals with assertEqual - Globally replace deprecated assert_ with assertTrue - Use bytes objects for both 'ay' signatured methods on the server - AcceptUnicodeString will return a native unicode, i.e. a str in Python 3 and a unicode in Python 2. Python 3 has no `unicode` built-in. - Reformat some long lines for debugging. - test-service.py: - Open the log file in 'a' mode for easier tailing. - AcceptUnicodeString will return a native unicode, i.e. a str in Python 3 and a unicode in Python 2. Python 3 has no `unicode` built-in. - reformat some long lines for debugging. - Put module-scope code into a main() function and add a bunch of logger output for better debugging. `session_bus` must still be global though. Wrap main() in a bit try/except to log all top-level exceptions.
* This is the big one; it adds Python 3 support.Barry Warsaw2011-12-151-3/+6
|
* Use Python 3 syntax to catch exceptionsBarry Warsaw2011-12-131-1/+1
| | | | Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Omit the remote traceback from certain D-Bus errorsSimon McVittie2008-07-171-0/+22
| | | | | | | | | | | Specifically, DBusException and its subclasses no longer have the remote traceback by default (although subclasses can turn it back on again by setting include_traceback = True, and the various "programmer error" subclasses of DBusException do have this set). Hopefully this will stop people thinking it's a dbus-python or telepathy-python bug when a D-Bus API like Telepathy deliberately raises an error (and so dbus-python or telepathy-python is visible in the traceback).
* Use MIT/X11 license for code owned by Collabora and Red Hat only, as per ↵Simon McVittie2007-09-281-14/+18
| | | | | | Havoc's permission (Message-ID: <815098350709271800k2505485dlef9414609d392b48@mail.gmail.com>)
* Update NEWS, and add regression tests for fd.o #12096 and #12403Simon McVittie2007-09-271-0/+8
|
* Add rel_path_keyword to @method (fd.o #11623)Simon McVittie2007-08-011-7/+8
|
* Fix introspection on objects with more than one connection or more than one ↵Simon McVittie2007-08-011-0/+8
| | | | object path (bugs.fd.o #11794)
* Measure async call timeout in seconds as intended, not in ms (blocking calls ↵Simon McVittie2007-07-311-0/+13
| | | | already used seconds). Add regression tests
* Implement fallback objects.Simon McVittie2007-06-181-0/+39
| | | | | | | | In the process, simplify the signal decorator a bit - don't allow the signal to be emitted from a subset of interfaces (removing connection_keyword), deprecate path_keyword, disallow path_keyword on objects that support multiple object paths, and add rel_path_keyword. This is an API removal since previous patches, but is compatible with the last release.
* dbus.service: Allow objects to start off unexported, and become exported later.Simon McVittie2007-06-111-5/+3
| | | | | | Also allow them to be exported on more than one object path or even connection. dbus.decorators: Allow connection_keyword on signals and methods, so we can tell which connection to use for any follow-up actions.
* dbus.service: change unexport() to remove_from_connection() at J5's requestSimon McVittie2007-06-041-1/+1
|
* dbus.service: Make it possible to unexport objects (fd.o#10457)Simon McVittie2007-05-301-3/+31
|
* _dbus_bindings/conn-methods.c: add list_exported_child_objects().Simon McVittie2007-05-291-0/+8
| | | | This is equivalent to dbus_connection_list_registered() in libdbus.
* dbus/gobject_service.py: Make ExportedGObject work correctly.Simon McVittie2007-05-031-0/+11
| | | | Also add a simple unit test for it.
* test/test-service.py: Use constants for the bus name and object pathSimon McVittie2007-04-271-4/+5
|
* Preparation for fallback-object support:Simon McVittie2007-04-251-0/+8
| | | | | | * Let exported methods receive the path, destination and raw message via kwargs, as well as the sender * Let exported signals be emitted from a variable object-path
* Fix fd.o #10174: make it possible to return multiple values with no signature.Simon McVittie2007-04-241-0/+5
| | | | | | | | | | | | | | | | | | More specifically: when a service method with no signature synchronously returns a tuple that is not a Struct, interpret it as a multi-valued return, rather than as a structure. This is a common Python idiom, and returning a struct makes little sense anyway when D-Bus lets you return multiple values. Returned lists are still interpreted as arrays - returning an array is entirely sensible, and indeed likely to be common. Async service methods are unaffected (there is no ambiguity), and it's still possible to return a structure by returning a dbus.Struct with appropriate contents. https://bugs.freedesktop.org/show_bug.cgi?id=10174
* test/test-service.py: use a constant for the interface name, for claritySimon McVittie2007-04-241-20/+23
|
* test/, include/: remove accidentally duplicated lines from license statementSimon McVittie2007-01-251-2/+0
|
* Switch to autotools and test with Python 2.5 as well as 2.4.Simon McVittie2006-12-181-6/+3
| | | | | | | | | | | | | | In the process: HACKING.txt: update include/dbus-python.h: add some typedefs to make it saner bus.c, conn.c, conn-methods.c: further alter docstrings to keep epydoc happy exceptions.c: create exceptions in a more longwinded way for Python 2.5 compatibility message-get-args.c, bus/__init__.py: tweak docstrings dbus/introspect_parser.py: make docstring valid reStructuredText run-test.sh: simplify, since configure now does some of the work test/*.py: use paths from run-test.sh, cope with out-of-tree builds test-standalone.py: carry out additional sanity checks
* - dbus.service.Object, dbus.decorators.method: Allow utf8_strings andSimon McVittie2006-11-141-0/+20
| | | | | | | | | | | | byte_arrays parameters kwargs when exporting a method. These change the calling convention in the same way as Message.get_args_list(). - dbus.proxies.ProxyMethod: allow the same kwargs to be passed to any proxy method; this time, they change the representation of the remote method's return value(s). - Test that the above work - Improve correctness of setting the NAME_FLAG_* flags - Whitespace tweaks (remove hard tabs)
* Update tests for the new variant APISimon McVittie2006-11-141-1/+1
|
* Seth was a Red Hat employee when contributing to dbus-python: alter ↵Simon McVittie2006-10-051-1/+1
| | | | copyright notices accordingly
* Add copyright, AFL2.1, GPL2 notices, which might even be correct...Simon McVittie2006-09-271-0/+22
| | | | | | | | | The lists of copyright holders are derived from the D-Bus CVS changelog: I've erred on the side of adding people to the list rather than not. For now I've assumed that J5's contributions are owned by Red Hat, Collabora people's contributions (Rob McQueen, Rob Taylor, Ole Andre Ravnaas, myself) are owned by Collabora and everything else is owned by the author.
* Throughout dbus-python: Use the C implementation.Simon McVittie2006-09-261-4/+12
| | | | | | Add document API_CHANGES.txt listing visible API changes. Add more test cases, for low-level Python <-> D-Bus type mappings. Amend existing test cases to cope with the API changes.
* * Add tests backJohn (J5) Palmieri2006-07-121-0/+142
* create a check command for distutils (python setup.py check)