summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Make all test scripts properly executableSimon McVittie2016-02-227-0/+4
| | | | Signed-off-by: Simon McVittie <smcv@debian.org>
* Use gi instead of gobject, everywhere except dbus.gobject_serviceSimon McVittie2016-01-201-2/+2
|
* Replace hard-coded sleep with a wait for the D-Bus name to appearSimon McVittie2016-01-202-6/+70
|
* Use non-recursive make for tests, and make them into installed-testsSimon McVittie2016-01-2010-225/+93
|
* Use non-recursive make for everything except testsSimon McVittie2016-01-201-1/+1
|
* Simplify testing by using dbus-run-session and Automake "log compiler"Simon McVittie2015-12-064-167/+167
| | | | | | | Fall back to Telepathy's old with-session-bus.sh script if dbus doesn't have dbus-run-session (versions < 1.8). Also run most of the tests individually, instead of under run-test.sh.
* Use AX_COMPILER_FLAGSSimon McVittie2015-12-061-7/+19
|
* Update build system for Automake 1.13 (parallel test driver)Simon McVittie2015-12-051-7/+9
|
* distribute new testsdbus-python-1.2.0Simon McVittie2013-05-081-0/+2
|
* Add support for skipping tests, and use itSimon McVittie2013-05-087-15/+62
| | | | | 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.
* utf8 test: pass when used with dbus 1.6.10, 1.7.2Simon McVittie2013-05-081-16/+25
| | | | We used to reject noncharacters, but now we accept them.
* Unset DBUS_STARTER_ADDRESS, DBUS_STARTER_BUS_TYPESimon McVittie2013-04-221-0/+2
| | | | See <https://bugs.freedesktop.org/show_bug.cgi?id=63119>.
* Slightly better test coverageSimon McVittie2012-10-161-0/+4
|
* Use a form of assertRaises() that works in Python 2.6Simon McVittie2012-10-161-3/+2
|
* Skip test_dbus_exception_convert_str_fail under unusual default encodingsSimon McVittie2012-10-161-3/+8
| | | | | This would actually work fine if the default encoding was UTF-8 or Latin-1 or something.
* Support unicode messages for DBusException in Python 2Michael Vogt2012-10-163-0/+95
| | | | | | [commit message amended -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=55899 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* run-test.sh: don't go via make to run the cross-testSimon McVittie2012-07-041-2/+2
| | | | | | Based on a patch from Christoph Höger. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=51725
* fd.o #40817: validate UTF-8 according to the same rules as libdbusdbus-python-1.1.1Simon McVittie2012-06-251-1/+58
|
* Py3: correctly guess the signature of ObjectPath(...) and Signature(...)Simon McVittie2012-06-051-0/+2
| | | | | | | | | | | | Under Python 2, ObjectPath and Signature are subtypes of str (= bytes), and the existing type-guessing worked. The type-guessing code assumed that all unicode objects were just strings, but that assumption became false in the Python 3 port: ObjectPath and Signature are still subtypes of str, but str now means unicode, not bytes. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=50740
* Rename gobject_service (PyGI version) to gi_serviceSimon McVittie2012-05-021-5/+5
| | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=48904
* Put sockets for the regression tests in /tmp, not ${builddir}Simon McVittie2012-02-291-1/+1
| | | | | | | | | Some automated build systems (naming no Portage) have really long build directories, which can cause dbus-python to hit the length limit for Unix sockets' names. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46747 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Test behaviour of various Message methodsSimon McVittie2012-01-111-0/+54
|
* Do not allow Byte(unicode(x)) (i.e. Byte(str(x)) in Python 3)Simon McVittie2012-01-112-16/+40
| | | | | Unicode strings aren't bytestrings, so there's no obvious meaning for the byte value of a Unicode string of length 1.
* Quash a few more deprecations.Barry Warsaw2011-12-172-6/+6
|
* More Python 3 porting, this time primarily to get test-client.py working.Barry Warsaw2011-12-163-124/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-162-9/+9
| | | | Fix another except syntax problem.
* Re-enable previously disabled test.Barry Warsaw2011-12-151-1/+2
|
* Fix the match rule semantics so that a match rule of "arg0='/'" does not matchBarry Warsaw2011-12-151-0/+19
| | | | object paths in Python3, as per Simon's review comments.
* - Added back the missing PY3PORT.rst file, with updates.Barry Warsaw2011-12-153-7/+13
| | | | | | | - Disallow appending unicode objects with 'y' (bytes) signatures. This now requires either a bytes object or an integer. Update the tests to reflect - this change. - Fix broken __all__ in Python 3.
* This is the big one; it adds Python 3 support.Barry Warsaw2011-12-159-203/+335
|
* First round of PyInt -> PyLong changes. These are only compatible with PythonBarry Warsaw2011-12-141-3/+4
| | | | | | | 2, since there are still some unconditional PyInt calls, which are not valid in Python 3. However, it lays the framework for conditionalizing on Python 3 and using only PyLong in that case. Where it doesn't matter, PyLong is used unconditionally.
* Use Python 3 syntax to catch exceptionsBarry Warsaw2011-12-133-11/+11
| | | | Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Add a regression test for fd.o #23831Simon McVittie2010-12-022-1/+23
|
* Use Py_CLEAR for greater robustnessSimon McVittie2010-12-021-4/+4
|
* fd.o #21831: deserialize empty ByteArray objects correctlySimon McVittie2010-11-231-0/+7
| | | | | | For some reason libdbus gives us NULL instead of a pointer to a zero-length object (i.e. any random place in the message would do), which Py_BuildValue doesn't interpret the way we'd want it to.
* tests/cross-test-*: don't use deprecated sets moduleSimon McVittie2010-02-182-5/+3
| | | | set() has been a built-in since 2.4, and we don't support older versions.
* Avoid some compiler warningsSimon McVittie2008-07-231-0/+2
|
* Omit the remote traceback from certain D-Bus errorsSimon McVittie2008-07-172-0/+59
| | | | | | | | | | | 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).
* Alter dbus.server.Server API to have pseudo-signalsSimon McVittie2008-07-151-11/+13
| | | | | | By either appending to a list of callbacks, or subclassing and providing a method, you can be notified when connections are added or removed. Inspired by the DBusServer patch from Huang Peng.
* test-server: import Connection from the right placeSimon McVittie2008-07-141-2/+2
|
* Initial support for DBusServer class (#14322).Mathias Hasselmann2008-07-141-0/+74
|
* Use MIT/X11 license as per permission given on the dbus mailing list.Simon McVittie2007-10-092-0/+40
| | | | | | | | | | | This affects code with copyright statements from the following individuals: * Anders Carlsson * Colin Walters * David Zeuthen * Rob Taylor and the following companies: * Collabora Ltd. (represented by me) * Red Hat Inc. (represented by Havoc Pennington)
* test/: add some missing copyright headersSimon McVittie2007-10-093-1/+31
|
* Use MIT/X11 license for code owned by Collabora and Red Hat only, as per ↵Simon McVittie2007-09-285-58/+93
| | | | | | Havoc's permission (Message-ID: <815098350709271800k2505485dlef9414609d392b48@mail.gmail.com>)
* Update NEWS, and add regression tests for fd.o #12096 and #12403Simon McVittie2007-09-272-0/+23
|
* Relicense Collabora code under the MIT/X11 license proposed for dbus core, ↵Simon McVittie2007-09-275-53/+91
| | | | removing all references to the LGPL as a result
* Makefile.am, test/Makefile.am: Use @abs_top_builddir@, @abs_top_srcdir@Simon McVittie2007-08-061-4/+6
| | | | | This fixes incorrect Python path for docs and tests if doing an out-of-tree build using an absolute path for $(srcdir), and is also less ugly.
* Add rel_path_keyword to @method (fd.o #11623)Simon McVittie2007-08-012-11/+27
|
* Avoid deprecated API in cross-testSimon McVittie2007-08-012-9/+10
|
* Fix introspection on objects with more than one connection or more than one ↵Simon McVittie2007-08-012-0/+19
| | | | object path (bugs.fd.o #11794)