summaryrefslogtreecommitdiff
path: root/test/test-client.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix NO_REPLY test for Python 3Simon McVittie2019-09-021-1/+2
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Add a test for NO_REPLY method callsSimon McVittie2019-09-021-0/+56
| | | | | | See https://gitlab.freedesktop.org/dbus/dbus-python/issues/26 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-3/+3
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Use TAP syntax for all directly-run testsSimon McVittie2016-08-111-3/+11
| | | | | | | For now this means that skipped tests will be reported as passed. This will be corrected in the next commit. Signed-off-by: Simon McVittie <smcv@debian.org>
* Use non-recursive make for tests, and make them into installed-testsSimon McVittie2016-01-201-8/+10
|
* Add support for skipping tests, and use itSimon McVittie2013-05-081-1/+5
| | | | | Now that Python 2.6 isn't a supported version in Debian, it doesn't get a gi module, but we can still get some minimal test coverage.
* Slightly better test coverageSimon McVittie2012-10-161-0/+4
|
* More Python 3 porting, this time primarily to get test-client.py working.Barry Warsaw2011-12-161-108/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Re-enable the other tests, even though these still fail for me (b.f.o #43303).Barry Warsaw2011-12-161-3/+3
| | | | Fix another except syntax problem.
* This is the big one; it adds Python 3 support.Barry Warsaw2011-12-151-65/+84
|
* Use Python 3 syntax to catch exceptionsBarry Warsaw2011-12-131-6/+6
| | | | Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Omit the remote traceback from certain D-Bus errorsSimon McVittie2008-07-171-0/+37
| | | | | | | | | | | 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-15/+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/+15
|
* Add rel_path_keyword to @method (fd.o #11623)Simon McVittie2007-08-011-4/+19
|
* Fix introspection on objects with more than one connection or more than one ↵Simon McVittie2007-08-011-0/+11
| | | | object path (bugs.fd.o #11794)
* Measure async call timeout in seconds as intended, not in ms (blocking calls ↵Simon McVittie2007-07-311-0/+40
| | | | already used seconds). Add regression tests
* test-client: Avoid deprecated usage - explicitly pass SessionBus() to ↵Simon McVittie2007-07-261-1/+1
| | | | BusName ctor
* Implement fallback objects.Simon McVittie2007-06-181-3/+19
| | | | | | | | 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: 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-0/+20
|
* _dbus_bindings/conn-methods.c: add list_exported_child_objects().Simon McVittie2007-05-291-0/+3
| | | | This is equivalent to dbus_connection_list_registered() in libdbus.
* dbus.connection: Release signals lock before calling _clean_up_signal_match().Simon McVittie2007-05-281-0/+2
| | | | | | | | | | This prevents a deadlock when a signal match that's tracking name owner changes is removed, causing a match on NameOwnerChanged to be removed too. (Debian bug#426412) Also move more of the tree manipulation inside the lock, to be nice to anyone attempting a port to implementations without a GIL (mainly IronPython), and add a regression test for the above bug.
* dbus/gobject_service.py: Make ExportedGObject work correctly.Simon McVittie2007-05-031-0/+10
| | | | Also add a simple unit test for it.
* dbus/_bus_mixin.py: Add bindings for ListNames, ListActivatableNames, ↵Simon McVittie2007-04-301-2/+22
| | | | GetNameOwner too
* Preparation for fallback-object support:Simon McVittie2007-04-251-0/+11
| | | | | | * 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/+6
| | | | | | | | | | | | | | | | | | 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-client.py: untabifySimon McVittie2007-04-241-8/+8
|
* test/, include/: remove accidentally duplicated lines from license statementSimon McVittie2007-01-251-2/+0
|
* dbus.Interface, dbus.ProxyObject: add get_dbus_method(), which can be used ↵Simon McVittie2007-01-091-0/+4
| | | | to call awkwardly-named methods like __getattr__
* Respect utf8_strings, byte_arrays options when calling methods asynchronously.Simon McVittie2006-12-191-9/+29
| | | | Also make it possible to fail the async call tests in test-client, and add a test case for utf8_strings in async use.
* Do cross-product of options in more obvious waySimon McVittie2006-12-191-12/+13
|
* 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
* test/test-client.py: Add test case for weak reference logic (which would ↵Simon McVittie2006-12-131-0/+10
| | | | segfault on 0.80rc1)
* - dbus.service.Object, dbus.decorators.method: Allow utf8_strings andSimon McVittie2006-11-141-1/+11
| | | | | | | | | | | | 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-6/+9
|
* 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/+23
| | | | | | | | | 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-14/+19
| | | | | | 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.
* test/test-client.py: Rename dbus.dbus_bindings to _dbus_bindings in test tooSimon McVittie2006-09-011-4/+4
|
* * fix import of dbus_bindingsJohn (J5) Palmieri2006-07-211-3/+3
|
* * Add tests backJohn (J5) Palmieri2006-07-121-0/+307
* create a check command for distutils (python setup.py check)