dbus/test/python test-client.py,1.15,1.16

Robert McQueen robot101 at freedesktop.org
Tue Nov 15 09:19:21 PST 2005


Update of /cvs/dbus/dbus/test/python
In directory gabe:/tmp/cvs-serv7289/test/python

Modified Files:
	test-client.py 
Log Message:
2005-11-15  Robert McQueen  <robot101 at debian.org>

	* bus/driver.c, bus/services.c, bus/services.h: Add a ReleaseName
	method to org.freedesktop.DBus to release a bus name or give up
	waiting in the queue for it.

	* dbus/dbus-bus.c, dbus/dbus-bus.h, dbus/dbus-shared.h: Add a
	dbus_bus_release_name method to send the ReleaseName method calls.
	Add constants for the return values to dbus/dbus-shared.h.

	* doc/dbus-specification.xml: Document the new ReleaseName method
	in the specification.

	* python/dbus_bindings.pyx: Add a low-level python binding for the
	release name method.

	* python/exceptions.py, python/service.py: Make freeing BusName
	objects release the name. Add a NameExistsException, and fix a
	bug with creating UnknownMethodException.

	* test/python/test-client.py: Add tests for freeing BusName
	objects causing names to be released.

Index: test-client.py
===================================================================
RCS file: /cvs/dbus/dbus/test/python/test-client.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- test-client.py	14 Nov 2005 02:53:29 -0000	1.15
+++ test-client.py	15 Nov 2005 17:19:19 -0000	1.16
@@ -252,8 +252,17 @@
                 else:
                     names[name] = busname
 
+                del busname
+
             print
 
+        del names
+
+        bus = dbus.Bus()
+        ret = dbus.dbus_bindings.bus_name_has_owner(bus._connection, 'org.freedesktop.DBus.Python.TestName')
+        self.assert_(not ret, 'deleting reference failed to release BusName org.freedesktop.DBus.Python.TestName')
+
+
 class TestDBusPythonToGLibBindings(unittest.TestCase):
     def setUp(self):
         self.bus = dbus.SessionBus()



More information about the dbus-commit mailing list