Hello community,

here is the log from the commit of package python-python-dbusmock for 
openSUSE:Factory checked in at 2019-11-22 10:18:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-dbusmock (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-dbusmock.new.26869 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-dbusmock"

Fri Nov 22 10:18:59 2019 rev:3 rq:741463 version:0.18.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-python-dbusmock/python-python-dbusmock.changes
    2019-02-01 11:44:25.568615299 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-python-dbusmock.new.26869/python-python-dbusmock.changes
 2019-11-22 10:18:59.737367598 +0100
@@ -1,0 +2,7 @@
+Mon Oct 21 09:50:55 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 0.18.3:
+  - Fix timeouts for loaded machines and parallel tests
+  - Fix tests for Python 3.8
+
+-------------------------------------------------------------------

Old:
----
  python-dbusmock-0.18.1.tar.gz

New:
----
  python-dbusmock-0.18.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-python-dbusmock.spec ++++++
--- /var/tmp/diff_new_pack.f1mBbw/_old  2019-11-22 10:19:00.969367280 +0100
+++ /var/tmp/diff_new_pack.f1mBbw/_new  2019-11-22 10:19:00.973367279 +0100
@@ -18,15 +18,13 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-python-dbusmock
-Version:        0.18.1
+Version:        0.18.3
 Release:        0
 Summary:        Python library for creating mock D-Bus objects
 License:        LGPL-3.0-or-later
-Group:          Development/Languages/Python
 URL:            https://github.com/martinpitt/python-dbusmock
 Source:         
https://files.pythonhosted.org/packages/source/p/python-dbusmock/python-dbusmock-%{version}.tar.gz
 BuildRequires:  %{python_module dbus-python}
-BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module nose}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
@@ -58,7 +56,7 @@
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-%python_exec setup.py test
+%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} 
nosetests-%{$python_bin_suffix} -v
 
 %files %{python_files}
 %license COPYING

++++++ python-dbusmock-0.18.1.tar.gz -> python-dbusmock-0.18.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-dbusmock-0.18.1/NEWS 
new/python-dbusmock-0.18.3/NEWS
--- old/python-dbusmock-0.18.1/NEWS     2018-11-11 21:54:43.000000000 +0100
+++ new/python-dbusmock-0.18.3/NEWS     2019-09-08 22:58:52.000000000 +0200
@@ -1,3 +1,12 @@
+0.18.3 (2019-09-08)
+-------------------
+ - Fix timeouts for loaded machines and parallel tests
+ - Fix tests for Python 3.8
+
+0.18.2 (2019-02-23)
+-------------------
+ - test: Adjust for changed version output format in systemd 241
+
 0.18.1 (2018-11-11)
 -------------------
  - test: Fix failures with systemd 239 in chroots
@@ -192,7 +201,7 @@
 0.10.3 (2014-07-16)
 -------------------
  - Fix upower tests to work for upower 0.99 in environments without a system
-   D-BUS.
+   D-Bus.
 
 0.10.2 (2014-07-16)
 -------------------
@@ -217,7 +226,7 @@
    with Qt's property support, d-feet, and other tools. Thanks Iain Lane!
  - Fix frequent KeyError() when calling static methods from a template.
    Regression from 0.9.
- - Support having the same method name on different D-BUS interfaces.
+ - Support having the same method name on different D-Bus interfaces.
  - Add ofono template with support for the Manager, VoiceCallManager, and
    NetworkRegistration/NetworkOperator interfaces.
  - Add template for systemd's timedated. Thanks Iain Lane!
@@ -278,7 +287,7 @@
 
 0.7.1 (2013-08-02)
 ------------------
- - Handle the "Disconnected" signal only if it comes from the D-BUS object, to
+ - Handle the "Disconnected" signal only if it comes from the D-Bus object, to
    avoid accidentally reacting to other signals (like from BlueZ). Thanks
    Lucas De Marchi.
 
@@ -298,7 +307,7 @@
 
 0.6.2 (2013-06-13)
 ------------------
- - Fix test_api.TestSubclass test to work without an existing session D-BUS.
+ - Fix test_api.TestSubclass test to work without an existing session D-Bus.
 
 0.6.1 (2013-06-13)
 ------------------
@@ -319,7 +328,7 @@
  - DBusMockObject.AddTemplate() and DBusTestCase.spawn_server_template() can
    now load local templates by specifying a path to a *.py file as template
    name. Thanks Lucas De Marchi.
- - Quit mock process if the D-BUS it connected to goes down. (LP: #1156561)
+ - Quit mock process if the D-Bus it connected to goes down. (LP: #1156561)
  - Support Get() and GetAll() with empty interface names, default to main
    interface in this case.
  - Add template for systemd's logind.
@@ -331,7 +340,7 @@
 
 0.4.0 (2013-01-21)
 ------------------
- - Add GetCalls(), GetMethodCalls() and ClearCalls() methods on the mock D-BUS
+ - Add GetCalls(), GetMethodCalls() and ClearCalls() methods on the mock D-Bus
    interface to query the call log, for cases where parsing stdout is
    inconvenient. Thanks to Robert Bruce Park for the patch! (LP: #1099483)
  - Document how to keep internal state in AddMethod().
@@ -347,7 +356,7 @@
 ----------------
  - In the logging of mock method calls, log the arguments as well.
  - Fix race condition in waiting for mock to get online on the bus, by avoiding
-   triggering D-BUS service activation with system-installed services.
+   triggering D-Bus service activation with system-installed services.
  - Add "notification_daemon" mock template.
 
 0.2.2 (2012-11-27)
@@ -374,7 +383,7 @@
    DBusTestCase.spawn_server_template(). Templates set up the common structure
    of these services (their main objects, properties, and methods) so that you
    do not need to carry around this common code, and only need to set up the
-   particular properties and specific D-BUS objects that you need. These
+   particular properties and specific D-Bus objects that you need. These
    templates can be parameterized for common customizations, and they can
    provide additional convenience methods on the org.freedesktop.DBus.Mock
    interface to provide more abstract functionality like "add a battery".
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-dbusmock-0.18.1/PKG-INFO 
new/python-dbusmock-0.18.3/PKG-INFO
--- old/python-dbusmock-0.18.1/PKG-INFO 2018-11-11 22:00:17.000000000 +0100
+++ new/python-dbusmock-0.18.3/PKG-INFO 2019-09-08 23:00:09.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: python-dbusmock
-Version: 0.18.1
+Version: 0.18.3
 Summary: Mock D-Bus objects
 Home-page: https://github.com/martinpitt/python-dbusmock
 Author: Martin Pitt
@@ -189,17 +189,17 @@
            Python.
         
          - You can use the ``GetCalls()``, ``GetMethodCalls()`` and 
``ClearCalls()``
-           methods on the ``org.freedesktop.DBus.Mock`` D-BUS interface to get 
an array
+           methods on the ``org.freedesktop.DBus.Mock`` D-Bus interface to get 
an array
            of tuples describing the calls.
         
         
         Templates
         ---------
-        Some D-BUS services are commonly used in test suites, such as UPower or
+        Some D-Bus services are commonly used in test suites, such as UPower or
         NetworkManager. python-dbusmock provides "templates" which set up the 
common
         structure of these services (their main objects, properties, and 
methods) so
         that you do not need to carry around this common code, and only need 
to set up
-        the particular properties and specific D-BUS objects that you need. 
These
+        the particular properties and specific D-Bus objects that you need. 
These
         templates can be parameterized for common customizations, and they can 
provide
         additional convenience methods on the ``org.freedesktop.DBus.Mock`` 
interface
         to provide more abstract functionality like "add a battery".
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-dbusmock-0.18.1/README.rst 
new/python-dbusmock-0.18.3/README.rst
--- old/python-dbusmock-0.18.1/README.rst       2018-11-11 21:54:43.000000000 
+0100
+++ new/python-dbusmock-0.18.3/README.rst       2019-09-08 22:58:52.000000000 
+0200
@@ -180,17 +180,17 @@
    Python.
 
  - You can use the ``GetCalls()``, ``GetMethodCalls()`` and ``ClearCalls()``
-   methods on the ``org.freedesktop.DBus.Mock`` D-BUS interface to get an array
+   methods on the ``org.freedesktop.DBus.Mock`` D-Bus interface to get an array
    of tuples describing the calls.
 
 
 Templates
 ---------
-Some D-BUS services are commonly used in test suites, such as UPower or
+Some D-Bus services are commonly used in test suites, such as UPower or
 NetworkManager. python-dbusmock provides "templates" which set up the common
 structure of these services (their main objects, properties, and methods) so
 that you do not need to carry around this common code, and only need to set up
-the particular properties and specific D-BUS objects that you need. These
+the particular properties and specific D-Bus objects that you need. These
 templates can be parameterized for common customizations, and they can provide
 additional convenience methods on the ``org.freedesktop.DBus.Mock`` interface
 to provide more abstract functionality like "add a battery".
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-dbusmock-0.18.1/dbusmock/__init__.py 
new/python-dbusmock-0.18.3/dbusmock/__init__.py
--- old/python-dbusmock-0.18.1/dbusmock/__init__.py     2018-11-11 
21:54:43.000000000 +0100
+++ new/python-dbusmock-0.18.3/dbusmock/__init__.py     2019-09-08 
22:58:52.000000000 +0200
@@ -1,5 +1,5 @@
 # coding: UTF-8
-'''Mock D-BUS objects for test suites.'''
+'''Mock D-Bus objects for test suites.'''
 
 # This program is free software; you can redistribute it and/or modify it under
 # the terms of the GNU Lesser General Public License as published by the Free
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-dbusmock-0.18.1/dbusmock/__main__.py 
new/python-dbusmock-0.18.3/dbusmock/__main__.py
--- old/python-dbusmock-0.18.1/dbusmock/__main__.py     2018-11-11 
21:54:43.000000000 +0100
+++ new/python-dbusmock-0.18.3/dbusmock/__main__.py     2019-09-08 
22:58:52.000000000 +0200
@@ -24,7 +24,7 @@
 
 
 def parse_args():
-    parser = argparse.ArgumentParser(description='mock D-BUS object')
+    parser = argparse.ArgumentParser(description='mock D-Bus object')
     parser.add_argument('-s', '--system', action='store_true',
                         help='put object(s) on system bus (default: session 
bus)')
     parser.add_argument('-l', '--logfile', metavar='PATH',
@@ -32,11 +32,11 @@
     parser.add_argument('-t', '--template', metavar='NAME',
                         help='template to load (instead of specifying name, 
path, interface)')
     parser.add_argument('name', metavar='NAME', nargs='?',
-                        help='D-BUS name to claim (e. g. 
"com.example.MyService") (if not using -t)')
+                        help='D-Bus name to claim (e. g. 
"com.example.MyService") (if not using -t)')
     parser.add_argument('path', metavar='PATH', nargs='?',
-                        help='D-BUS object path for initial/main object (if 
not using -t)')
+                        help='D-Bus object path for initial/main object (if 
not using -t)')
     parser.add_argument('interface', metavar='INTERFACE', nargs='?',
-                        help='main D-BUS interface name for initial object (if 
not using -t)')
+                        help='main D-Bus interface name for initial object (if 
not using -t)')
     parser.add_argument('-m', '--is-object-manager', action='store_true',
                         help='automatically implement the 
org.freedesktop.DBus.ObjectManager interface')
     parser.add_argument('-p', '--parameters',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-dbusmock-0.18.1/dbusmock/mockobject.py 
new/python-dbusmock-0.18.3/dbusmock/mockobject.py
--- old/python-dbusmock-0.18.1/dbusmock/mockobject.py   2018-11-11 
21:54:43.000000000 +0100
+++ new/python-dbusmock-0.18.3/dbusmock/mockobject.py   2019-09-08 
22:58:52.000000000 +0200
@@ -1,5 +1,5 @@
 # coding: UTF-8
-'''Mock D-BUS objects for test suites.'''
+'''Mock D-Bus objects for test suites.'''
 
 # This program is free software; you can redistribute it and/or modify it under
 # the terms of the GNU Lesser General Public License as published by the Free
@@ -69,7 +69,7 @@
                properties on "interface"
         logfile: When given, method calls will be logged into that file name;
                  if None, logging will be written to stdout. Note that you can
-                 also query the called methods over D-BUS with GetCalls() and
+                 also query the called methods over D-Bus with GetCalls() and
                  GetMethodCalls().
         is_object_manager: If True, the GetManagedObjects method will
                            automatically be implemented on the object, 
returning
@@ -439,7 +439,7 @@
         if hasattr(module, 'IS_OBJECT_MANAGER') and module.IS_OBJECT_MANAGER:
             self._set_up_object_manager()
 
-        # pick out all D-BUS service methods and add them to our interface
+        # pick out all D-Bus service methods and add them to our interface
         for symbol in dir(module):
             fn = getattr(module, symbol)
             if ('_dbus_interface' in dir(fn) and ('_dbus_is_signal' not in 
dir(fn) or not fn._dbus_is_signal)):
@@ -579,15 +579,13 @@
                 return loc['ret']
 
     def format_args(self, args):
-        '''Format a D-BUS argument tuple into an appropriate logging string.'''
+        '''Format a D-Bus argument tuple into an appropriate logging string.'''
 
         def format_arg(a):
             if isinstance(a, dbus.Boolean):
                 return str(bool(a))
-            if isinstance(a, dbus.Byte):
+            if isinstance(a, dbus.Byte) or isinstance(a, int) or isinstance(a, 
long):
                 return str(int(a))
-            if isinstance(a, int) or isinstance(a, long):
-                return str(a)
             if isinstance(a, str):
                 return '"' + str(a) + '"'
             if isinstance(a, unicode):  # Python 2 only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-dbusmock-0.18.1/dbusmock/templates/__init__.py 
new/python-dbusmock-0.18.3/dbusmock/templates/__init__.py
--- old/python-dbusmock-0.18.1/dbusmock/templates/__init__.py   2018-11-11 
21:54:43.000000000 +0100
+++ new/python-dbusmock-0.18.3/dbusmock/templates/__init__.py   2019-09-08 
22:58:52.000000000 +0200
@@ -1,4 +1,4 @@
-'''Mock templates for common D-BUS services'''
+'''Mock templates for common D-Bus services'''
 
 # This program is free software; you can redistribute it and/or modify it under
 # the terms of the GNU Lesser General Public License as published by the Free
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-dbusmock-0.18.1/dbusmock/templates/logind.py 
new/python-dbusmock-0.18.3/dbusmock/templates/logind.py
--- old/python-dbusmock-0.18.1/dbusmock/templates/logind.py     2018-11-11 
21:54:43.000000000 +0100
+++ new/python-dbusmock-0.18.3/dbusmock/templates/logind.py     2019-09-08 
22:58:52.000000000 +0200
@@ -1,7 +1,7 @@
 '''systemd logind mock template
 
 This creates the expected methods and properties of the main
-org.freedesktop.login1.Manager object. You can specify D-BUS property values
+org.freedesktop.login1.Manager object. You can specify D-Bus property values
 like "CanSuspend" or the return value of Inhibit() in "parameters".
 '''
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-dbusmock-0.18.1/dbusmock/templates/ofono.py 
new/python-dbusmock-0.18.3/dbusmock/templates/ofono.py
--- old/python-dbusmock-0.18.1/dbusmock/templates/ofono.py      2018-11-11 
21:54:43.000000000 +0100
+++ new/python-dbusmock-0.18.3/dbusmock/templates/ofono.py      2019-09-08 
22:58:52.000000000 +0200
@@ -1,4 +1,4 @@
-'''ofonod D-BUS mock template'''
+'''ofonod D-Bus mock template'''
 
 # This program is free software; you can redistribute it and/or modify it under
 # the terms of the GNU Lesser General Public License as published by the Free
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-dbusmock-0.18.1/dbusmock/templates/polkitd.py 
new/python-dbusmock-0.18.3/dbusmock/templates/polkitd.py
--- old/python-dbusmock-0.18.1/dbusmock/templates/polkitd.py    2018-11-11 
21:54:43.000000000 +0100
+++ new/python-dbusmock-0.18.3/dbusmock/templates/polkitd.py    2019-09-08 
22:58:52.000000000 +0200
@@ -2,7 +2,7 @@
 
 This creates the expected methods and properties of the main
 org.freedesktop.PolicyKit1 object. By default, all actions are rejected.  You
-can call AllowUnknown() and SetAllowed() on the mock D-BUS interface to control
+can call AllowUnknown() and SetAllowed() on the mock D-Bus interface to control
 which actions are allowed.
 '''
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-dbusmock-0.18.1/dbusmock/templates/timedated.py 
new/python-dbusmock-0.18.3/dbusmock/templates/timedated.py
--- old/python-dbusmock-0.18.1/dbusmock/templates/timedated.py  2018-11-11 
21:54:43.000000000 +0100
+++ new/python-dbusmock-0.18.3/dbusmock/templates/timedated.py  2019-09-08 
22:58:52.000000000 +0200
@@ -1,7 +1,7 @@
 '''systemd timedated mock template
 
 This creates the expected methods and properties of the main
-org.freedesktop.timedate object. You can specify D-BUS property values like
+org.freedesktop.timedate object. You can specify D-Bus property values like
 "Timezone" or "NTP" in "parameters".
 '''
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-dbusmock-0.18.1/dbusmock/templates/upower.py 
new/python-dbusmock-0.18.3/dbusmock/templates/upower.py
--- old/python-dbusmock-0.18.1/dbusmock/templates/upower.py     2018-11-11 
21:54:43.000000000 +0100
+++ new/python-dbusmock-0.18.3/dbusmock/templates/upower.py     2019-09-08 
22:58:52.000000000 +0200
@@ -5,9 +5,9 @@
 such as 'OnLowBattery' or the return value of 'SuspendAllowed',
 'HibernateAllowed', and 'GetCriticalAction' in "parameters".
 
-This provides the 0.9 D-BUS API of upower by default, but if the
+This provides the 0.9 D-Bus API of upower by default, but if the
 DaemonVersion property (in parameters) is set to >= 0.99 it will provide the
-1.0 D-BUS API instead.
+1.0 D-Bus API instead.
 '''
 
 # This program is free software; you can redistribute it and/or modify it under
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-dbusmock-0.18.1/dbusmock/testcase.py 
new/python-dbusmock-0.18.3/dbusmock/testcase.py
--- old/python-dbusmock-0.18.1/dbusmock/testcase.py     2018-11-11 
21:54:43.000000000 +0100
+++ new/python-dbusmock-0.18.3/dbusmock/testcase.py     2019-09-08 
22:58:52.000000000 +0200
@@ -27,7 +27,7 @@
 
 
 class DBusTestCase(unittest.TestCase):
-    '''Base class for D-BUS mock tests.
+    '''Base class for D-Bus mock tests.
 
     This provides some convenience API to start/stop local D-Buses, so that you
     can run a private local session and/or system bus to run mocks on.
@@ -90,7 +90,7 @@
 
     @classmethod
     def start_dbus(klass, conf=None):
-        '''Start a D-BUS daemon
+        '''Start a D-Bus daemon
 
         Return (pid, address) pair.
 
@@ -112,7 +112,7 @@
 
     @classmethod
     def stop_dbus(klass, pid):
-        '''Stop a D-BUS daemon
+        '''Stop a D-Bus daemon
 
         Normally you do not need to call this directly. When you use
         start_system_bus() and start_session_bus(), these buses are
@@ -153,10 +153,10 @@
                 return dbus.SessionBus()
 
     @classmethod
-    def wait_for_bus_object(klass, dest, path, system_bus=False, timeout=50):
-        '''Wait for an object to appear on D-BUS
+    def wait_for_bus_object(klass, dest, path, system_bus=False, timeout=600):
+        '''Wait for an object to appear on D-Bus
 
-        Raise an exception if object does not appear within 5 seconds. You can
+        Raise an exception if object does not appear within one minute. You can
         change the timeout with the "timeout" keyword argument which specifies
         deciseconds.
         '''
@@ -182,13 +182,13 @@
             timeout -= 1
             time.sleep(0.1)
         if timeout <= 0:
-            assert timeout > 0, 'timed out waiting for D-BUS object %s: %s' % 
(path, last_exc)
+            assert timeout > 0, 'timed out waiting for D-Bus object %s: %s' % 
(path, last_exc)
 
     @classmethod
     def spawn_server(klass, name, path, interface, system_bus=False, 
stdout=None):
         '''Run a DBusMockObject instance in a separate process
 
-        The daemon will terminate automatically when the D-BUS that it connects
+        The daemon will terminate automatically when the D-Bus that it connects
         to goes down.  If that does not happen (e. g. you test on the actual
         system/session bus), you need to kill it manually.
 
@@ -213,13 +213,13 @@
 
     @classmethod
     def spawn_server_template(klass, template, parameters=None, stdout=None):
-        '''Run a D-BUS mock template instance in a separate process
+        '''Run a D-Bus mock template instance in a separate process
 
-        This starts a D-BUS mock process and loads the given template with
+        This starts a D-Bus mock process and loads the given template with
         (optional) parameters into it. For details about templates see
         dbusmock.DBusMockObject.AddTemplate().
 
-        The daemon will terminate automatically when the D-BUS that it connects
+        The daemon will terminate automatically when the D-Bus that it connects
         to goes down.  If that does not happen (e. g. you test on the actual
         system/session bus), you need to kill it manually.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-dbusmock-0.18.1/python_dbusmock.egg-info/PKG-INFO 
new/python-dbusmock-0.18.3/python_dbusmock.egg-info/PKG-INFO
--- old/python-dbusmock-0.18.1/python_dbusmock.egg-info/PKG-INFO        
2018-11-11 22:00:17.000000000 +0100
+++ new/python-dbusmock-0.18.3/python_dbusmock.egg-info/PKG-INFO        
2019-09-08 23:00:09.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: python-dbusmock
-Version: 0.18.1
+Version: 0.18.3
 Summary: Mock D-Bus objects
 Home-page: https://github.com/martinpitt/python-dbusmock
 Author: Martin Pitt
@@ -189,17 +189,17 @@
            Python.
         
          - You can use the ``GetCalls()``, ``GetMethodCalls()`` and 
``ClearCalls()``
-           methods on the ``org.freedesktop.DBus.Mock`` D-BUS interface to get 
an array
+           methods on the ``org.freedesktop.DBus.Mock`` D-Bus interface to get 
an array
            of tuples describing the calls.
         
         
         Templates
         ---------
-        Some D-BUS services are commonly used in test suites, such as UPower or
+        Some D-Bus services are commonly used in test suites, such as UPower or
         NetworkManager. python-dbusmock provides "templates" which set up the 
common
         structure of these services (their main objects, properties, and 
methods) so
         that you do not need to carry around this common code, and only need 
to set up
-        the particular properties and specific D-BUS objects that you need. 
These
+        the particular properties and specific D-Bus objects that you need. 
These
         templates can be parameterized for common customizations, and they can 
provide
         additional convenience methods on the ``org.freedesktop.DBus.Mock`` 
interface
         to provide more abstract functionality like "add a battery".
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-dbusmock-0.18.1/tests/test_api.py 
new/python-dbusmock-0.18.3/tests/test_api.py
--- old/python-dbusmock-0.18.1/tests/test_api.py        2018-11-11 
21:54:43.000000000 +0100
+++ new/python-dbusmock-0.18.3/tests/test_api.py        2019-09-08 
22:58:52.000000000 +0200
@@ -190,7 +190,7 @@
                 self.fail('method call did not raise an error for signature 
"%s" and arguments %s'
                           % (signature, args))
             except dbus.exceptions.DBusException as e:
-                self.assertTrue(err in str(e), e)
+                self.assertIn(err, str(e))
 
         # not enough arguments
         check('i', [], 'TypeError: More items found')
@@ -344,20 +344,28 @@
         dbus_introspect = dbus.Interface(self.obj_test, 
dbus.INTROSPECTABLE_IFACE)
 
         xml_empty = dbus_introspect.Introspect()
-        self.assertTrue('<interface name="org.freedesktop.DBus.Mock">' in 
xml_empty, xml_empty)
-        self.assertTrue('<method name="AddMethod">' in xml_empty, xml_empty)
+        self.assertIn('<interface name="org.freedesktop.DBus.Mock">', 
xml_empty)
+        self.assertIn('<method name="AddMethod">', xml_empty)
 
         self.dbus_mock.AddMethod('', 'Do', 'saiv', 'i', 'ret = 42')
 
         xml_method = dbus_introspect.Introspect()
-        self.assertFalse(xml_empty == xml_method, 'No change from empty XML')
-        self.assertTrue('<interface name="org.freedesktop.Test.Main">' in 
xml_method, xml_method)
-        self.assertTrue('''<method name="Do">
+        self.assertNotEqual(xml_empty, xml_method)
+        self.assertIn('<interface name="org.freedesktop.Test.Main">', 
xml_method)
+        # various Python versions use different name vs. type ordering
+        expected1 = '''<method name="Do">
       <arg direction="in" name="arg1" type="s" />
       <arg direction="in" name="arg2" type="ai" />
       <arg direction="in" name="arg3" type="v" />
       <arg direction="out" type="i" />
-    </method>''' in xml_method, xml_method)
+    </method>'''
+        expected2 = '''<method name="Do">
+      <arg direction="in" type="s" name="arg1" />
+      <arg direction="in" type="ai" name="arg2" />
+      <arg direction="in" type="v" name="arg3" />
+      <arg direction="out" type="i" />
+    </method>'''
+        self.assertTrue(expected1 in xml_method or expected2 in xml_method, 
xml_method)
 
     # properties in introspection are not supported by dbus-python right now
     def test_introspection_properties(self):
@@ -368,10 +376,13 @@
 
         xml = self.obj_test.Introspect()
 
-        self.assertTrue('<interface name="org.freedesktop.Test.Main">' in xml, 
xml)
-        self.assertTrue('<interface name="org.freedesktop.Test.Sub">' in xml, 
xml)
-        self.assertTrue('<property access="readwrite" name="Color" type="s" 
/>' in xml, xml)
-        self.assertTrue('<property access="readwrite" name="Count" type="i" 
/>' in xml, xml)
+        self.assertIn('<interface name="org.freedesktop.Test.Main">', xml)
+        self.assertIn('<interface name="org.freedesktop.Test.Sub">', xml)
+        # various Python versions use different attribute ordering
+        self.assertTrue('<property access="readwrite" name="Color" type="s" 
/>' in xml or
+                        '<property name="Color" type="s" access="readwrite" 
/>' in xml, xml)
+        self.assertTrue('<property access="readwrite" name="Count" type="i" 
/>' in xml or
+                        '<property name="Count" type="i" access="readwrite" 
/>' in xml, xml)
 
     def test_objects_map(self):
         '''access global objects map'''
@@ -467,7 +478,7 @@
                 self.fail('EmitSignal did not raise an error for signature 
"%s" and arguments %s'
                           % (signature, args))
             except dbus.exceptions.DBusException as e:
-                self.assertTrue(err in str(e), e)
+                self.assertIn(err, str(e))
 
         # not enough arguments
         check('i', [], 'TypeError: More items found')
@@ -483,7 +494,7 @@
         check('s', [1], 'TypeError: Expected a string')
 
     def test_dbus_get_log(self):
-        '''query call logs over D-BUS'''
+        '''query call logs over D-Bus'''
 
         self.assertEqual(self.dbus_mock.ClearCalls(), None)
         self.assertEqual(self.dbus_mock.GetCalls(), dbus.Array([]))
@@ -514,7 +525,7 @@
         self.assertEqual(self.dbus_mock.GetCalls(), dbus.Array([]))
 
     def test_dbus_get_method_calls(self):
-        '''query method call logs over D-BUS'''
+        '''query method call logs over D-Bus'''
 
         self.dbus_mock.AddMethod('', 'Do', '', '', '')
         self.assertEqual(self.dbus_test.Do(), None)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-dbusmock-0.18.1/tests/test_cli.py 
new/python-dbusmock-0.18.3/tests/test_cli.py
--- old/python-dbusmock-0.18.1/tests/test_cli.py        2018-11-11 
21:54:43.000000000 +0100
+++ new/python-dbusmock-0.18.3/tests/test_cli.py        2019-09-08 
22:58:52.000000000 +0200
@@ -133,7 +133,7 @@
                              universal_newlines=True)
         (out, err) = p.communicate()
         self.assertEqual(out, '')
-        self.assertTrue('must specify NAME' in err, err)
+        self.assertIn('must specify NAME', err)
         self.assertNotEqual(p.returncode, 0)
 
     def test_help(self):
@@ -142,8 +142,8 @@
                              universal_newlines=True)
         (out, err) = p.communicate()
         self.assertEqual(err, '')
-        self.assertTrue('INTERFACE' in out, out)
-        self.assertTrue('--system' in out, out)
+        self.assertIn('INTERFACE', out)
+        self.assertIn('--system', out)
         self.assertEqual(p.returncode, 0)
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-dbusmock-0.18.1/tests/test_code.py 
new/python-dbusmock-0.18.3/tests/test_code.py
--- old/python-dbusmock-0.18.1/tests/test_code.py       2018-11-11 
21:54:43.000000000 +0100
+++ new/python-dbusmock-0.18.3/tests/test_code.py       2019-09-08 
22:58:52.000000000 +0200
@@ -16,19 +16,22 @@
 import subprocess
 
 try:
-    pycodestyle = subprocess.check_output(['/bin/sh', '-ec', 'which 
pycodestyle-3 2>/dev/null || which pycodestyle']).strip()
+    pycodestyle = subprocess.check_output(['/bin/bash', '-ec', 'type -p 
pycodestyle-3 || type -p pycodestyle']).strip()
 except subprocess.CalledProcessError:
     pycodestyle = None
 
+try:
+    pyflakes = subprocess.check_output(['/bin/bash', '-ec', 'type -p 
pyflakes-3 || type -p pyflakes3']).strip()
+except subprocess.CalledProcessError:
+    pyflakes = None
+
 
 class StaticCodeTests(unittest.TestCase):
-    @unittest.skipIf(subprocess.call(['which', 'pyflakes3'], 
stdout=subprocess.PIPE) != 0,
-                     'pyflakes3 not installed')
+    @unittest.skipUnless(pyflakes, 'pyflakes3 not installed')
     def test_pyflakes(self):
-        pyflakes = subprocess.Popen(['pyflakes3', '.'], stdout=subprocess.PIPE,
-                                    universal_newlines=True)
-        (out, err) = pyflakes.communicate()
-        self.assertEqual(pyflakes.returncode, 0, out)
+        flakes = subprocess.Popen([pyflakes, '.'], stdout=subprocess.PIPE, 
universal_newlines=True)
+        (out, err) = flakes.communicate()
+        self.assertEqual(flakes.returncode, 0, out)
 
     @unittest.skipUnless(pycodestyle, 'pycodestyle not installed')
     def test_codestyle(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-dbusmock-0.18.1/tests/test_logind.py 
new/python-dbusmock-0.18.3/tests/test_logind.py
--- old/python-dbusmock-0.18.1/tests/test_logind.py     2018-11-11 
21:54:43.000000000 +0100
+++ new/python-dbusmock-0.18.3/tests/test_logind.py     2019-09-08 
22:58:52.000000000 +0200
@@ -14,6 +14,7 @@
 import unittest
 import os
 import sys
+import re
 import subprocess
 
 import dbusmock
@@ -37,7 +38,7 @@
         if have_loginctl:
             out = subprocess.check_output(['loginctl', '--version'],
                                           universal_newlines=True)
-            klass.version = out.splitlines()[0].split()[-1]
+            klass.version = re.search(r'(\d+)', out.splitlines()[0]).group(1)
 
     def setUp(self):
         self.p_mock = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-dbusmock-0.18.1/tests/test_upower.py 
new/python-dbusmock-0.18.3/tests/test_upower.py
--- old/python-dbusmock-0.18.1/tests/test_upower.py     2018-11-11 
21:54:43.000000000 +0100
+++ new/python-dbusmock-0.18.3/tests/test_upower.py     2019-09-08 
22:58:52.000000000 +0200
@@ -37,7 +37,7 @@
         upower_client_version = out.splitlines()[0].split()[-1]
         assert p.returncode == 0
     except IndexError:
-        # FIXME: this happens in environments without a system D-BUS; upower
+        # FIXME: this happens in environments without a system D-Bus; upower
         # 0.9 still prints the client version, 0.99 just crashes
         upower_client_version = '0.99'
 else:
@@ -78,7 +78,7 @@
         for line in out.splitlines():
             if line.endswith('/DisplayDevice'):
                 continue
-            self.assertFalse('Device' in line, out)
+            self.assertNotIn('Device', line)
         self.assertRegex(out, 'on-battery:\\s+yes')
         self.assertRegex(out, 'lid-is-present:\\s+yes')
 
@@ -245,7 +245,7 @@
         for line in out.splitlines():
             if line.endswith('/DisplayDevice'):
                 continue
-            self.assertFalse('Device' in line, out)
+            self.assertNotIn('Device', line)
         self.assertRegex(out, 'on-battery:\\s+yes')
         self.assertRegex(out, 'lid-is-present:\\s+yes')
 


Reply via email to