[pytango] 56/122: Update test context

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:18:18 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to tag v9.2.1
in repository pytango.

commit 5f03f6e735b7f045b8670078d4a9c5208df68f36
Author: Vincent Michel <vincent.michel at maxlab.lu.se>
Date:   Tue Oct 11 14:12:44 2016 +0200

    Update test context
---
 test/context.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/test/context.py b/test/context.py
index 902c840..c3073e4 100644
--- a/test/context.py
+++ b/test/context.py
@@ -78,7 +78,7 @@ class TangoTestContext(object):
         self.host = "{0}:{1}/".format(platform.node(), self.port)
         self.device = self.server = None
         # File
-        self.generate_db_file(server_name, instance_name, device_name, db,
+        self.generate_db_file(server_name, instance_name, device_name,
                               tangoclass, properties)
         # Command args
         string = self.command.format(server_name, instance_name, port, db)
@@ -99,18 +99,17 @@ class TangoTestContext(object):
         self.thread = cls(target=target, args=args)
         self.thread.daemon = daemon
 
-    @staticmethod
-    def generate_db_file(server, instance, device, db,
+    def generate_db_file(self, server, instance, device,
                          tangoclass=None, properties={}):
         """Generate a database file corresponding to the given arguments."""
         if not tangoclass:
             tangoclass = server
         # Open the file
-        with open(db, 'w') as f:
+        with open(self.db, 'w') as f:
             f.write("/".join((server, instance, "DEVICE", tangoclass)))
             f.write(': "' + device + '"\n')
         # Create database
-        db = Database(db)
+        db = Database(self.db)
         # Patched the property dict to avoid a PyTango bug
         patched = dict((key, value if value != '' else ' ')
                        for key, value in properties.items())

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list