summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2016-03-05 16:32:44 +0000
committerSimon McVittie <smcv@debian.org>2016-03-05 16:36:54 +0000
commited350ae4f4e43d0f5146c5891069829e89018322 (patch)
tree8b0ab91c655d7a4682f7352fc24aea7916f3300a /test
parente119bf86c5a4a10ea4ed048df3a5d4a78fa15d5c (diff)
downloaddbus-python-ed350ae4f4e43d0f5146c5891069829e89018322.tar.gz
Add a regression test for the version numbering
Now that dbus.__version__ and dbus.version exist even in uninstalled builds, we can do this. Signed-off-by: Simon McVittie <smcv@debian.org>
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-standalone.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test-standalone.py b/test/test-standalone.py
index 6a68c36..694e821 100755
--- a/test/test-standalone.py
+++ b/test/test-standalone.py
@@ -514,6 +514,20 @@ class TestMatching(unittest.TestCase):
self._message.append('/', signature='o')
self.assertFalse(self._match.maybe_handle_message(self._message))
+class TestVersion(unittest.TestCase):
+ if sys.version_info[:2] < (2, 7):
+ def assertGreater(self, first, second):
+ self.assertTrue(first > second)
+
+ def assertLess(self, first, second):
+ self.assertTrue(first < second)
+
+ def test_version(self):
+ self.assertGreater(dbus.version, (0, 41))
+ self.assertLess(dbus.version, (23, 0))
+ self.assertGreater(dbus.__version__, '0')
+ self.assertLess(dbus.__version__, '9')
+
if __name__ == '__main__':
# Python 2.6 doesn't accept a `verbosity` keyword.
kwargs = {}