|
|
1cf00d |
From 826d887e8c76654e16dab2249b6035b748bdfeeb Mon Sep 17 00:00:00 2001
|
|
|
1cf00d |
From: Christian Kellner <christian@kellner.me>
|
|
|
1cf00d |
Date: Wed, 6 Jun 2018 20:12:26 +0200
|
|
|
1cf00d |
Subject: [PATCH] test: integration: py2 compatibility
|
|
|
1cf00d |
|
|
|
1cf00d |
The integration test was designed to run with python3, but we it
|
|
|
1cf00d |
can be made to work with python2 quite easily so do that.
|
|
|
1cf00d |
---
|
|
|
1cf00d |
tests/test-integration | 3 +++
|
|
|
1cf00d |
1 file changed, 3 insertions(+)
|
|
|
1cf00d |
|
|
|
1cf00d |
diff --git a/tests/test-integration b/tests/test-integration
|
|
|
1cf00d |
index 40c917d..f24900a 100755
|
|
|
1cf00d |
--- a/tests/test-integration
|
|
|
1cf00d |
+++ b/tests/test-integration
|
|
|
1cf00d |
@@ -1,4 +1,5 @@
|
|
|
1cf00d |
#!/usr/bin/python3
|
|
|
1cf00d |
+# -*- coding: utf-8 -*-
|
|
|
1cf00d |
#
|
|
|
1cf00d |
# bolt integration test suite
|
|
|
1cf00d |
#
|
|
|
1cf00d |
@@ -19,6 +20,8 @@
|
|
|
1cf00d |
# Authors:
|
|
|
1cf00d |
# Christian J. Kellner <christian@kellner.me>
|
|
|
1cf00d |
|
|
|
1cf00d |
+from __future__ import print_function
|
|
|
1cf00d |
+
|
|
|
1cf00d |
import binascii
|
|
|
1cf00d |
import os
|
|
|
1cf00d |
import shutil
|
|
|
1cf00d |
--
|
|
|
1cf00d |
2.17.1
|
|
|
1cf00d |
|
|
|
1cf00d |
From d8e8920806a9d1afa691e4d5e7f16c67806d110c Mon Sep 17 00:00:00 2001
|
|
|
1cf00d |
From: Christian Kellner <christian@kellner.me>
|
|
|
1cf00d |
Date: Wed, 6 Jun 2018 20:20:02 +0200
|
|
|
1cf00d |
Subject: [PATCH] test: integration: import configparser globally
|
|
|
1cf00d |
|
|
|
1cf00d |
Instead of importing it twice locally in two functions, import it
|
|
|
1cf00d |
globally; do so in the checked block because it is not installed
|
|
|
1cf00d |
by default and thus might be missing.
|
|
|
1cf00d |
---
|
|
|
1cf00d |
tests/test-integration | 4 ++--
|
|
|
1cf00d |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
1cf00d |
|
|
|
1cf00d |
diff --git a/tests/test-integration b/tests/test-integration
|
|
|
1cf00d |
index f24900a..d2fd7df 100755
|
|
|
1cf00d |
--- a/tests/test-integration
|
|
|
1cf00d |
+++ b/tests/test-integration
|
|
|
1cf00d |
@@ -45,6 +45,8 @@ try:
|
|
|
1cf00d |
|
|
|
1cf00d |
import dbus
|
|
|
1cf00d |
import dbusmock
|
|
|
1cf00d |
+
|
|
|
1cf00d |
+ import configparser
|
|
|
1cf00d |
except ImportError as e:
|
|
|
1cf00d |
sys.stderr.write('Skipping integration test due to missing depdendencies: %s\n' % str(e))
|
|
|
1cf00d |
sys.exit(1)
|
|
|
1cf00d |
@@ -924,7 +926,6 @@ class BoltTest(dbusmock.DBusTestCase):
|
|
|
1cf00d |
self.polkitd = None
|
|
|
1cf00d |
|
|
|
1cf00d |
def user_config(self, **kwargs):
|
|
|
1cf00d |
- import configparser
|
|
|
1cf00d |
cfg = configparser.ConfigParser()
|
|
|
1cf00d |
cfg.optionxform = lambda option: option
|
|
|
1cf00d |
|
|
|
1cf00d |
@@ -1017,7 +1018,6 @@ class BoltTest(dbusmock.DBusTestCase):
|
|
|
1cf00d |
return x[0]
|
|
|
1cf00d |
|
|
|
1cf00d |
def store_device(self, dev, policy='auto', key=None):
|
|
|
1cf00d |
- import configparser
|
|
|
1cf00d |
df = configparser.ConfigParser()
|
|
|
1cf00d |
df.optionxform = lambda option: option
|
|
|
1cf00d |
|
|
|
1cf00d |
--
|
|
|
1cf00d |
2.17.1
|
|
|
1cf00d |
|
|
|
1cf00d |
From 4ada3a5ce4aa4cfe7e3f0a066c2b9be7281f8930 Mon Sep 17 00:00:00 2001
|
|
|
1cf00d |
From: Christian Kellner <christian@kellner.me>
|
|
|
1cf00d |
Date: Wed, 6 Jun 2018 20:34:56 +0200
|
|
|
1cf00d |
Subject: [PATCH] test: integration: use default python
|
|
|
1cf00d |
|
|
|
1cf00d |
Instead of explicitly specifying the python version, use the
|
|
|
1cf00d |
default, i.e. /usr/bin/python
|
|
|
1cf00d |
---
|
|
|
1cf00d |
tests/test-integration | 2 +-
|
|
|
1cf00d |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
1cf00d |
|
|
|
1cf00d |
diff --git a/tests/test-integration b/tests/test-integration
|
|
|
1cf00d |
index d2fd7df..66fb89f 100755
|
|
|
1cf00d |
--- a/tests/test-integration
|
|
|
1cf00d |
+++ b/tests/test-integration
|
|
|
1cf00d |
@@ -1,4 +1,4 @@
|
|
|
1cf00d |
-#!/usr/bin/python3
|
|
|
1cf00d |
+#!/usr/bin/python
|
|
|
1cf00d |
# -*- coding: utf-8 -*-
|
|
|
1cf00d |
#
|
|
|
1cf00d |
# bolt integration test suite
|
|
|
1cf00d |
--
|
|
|
1cf00d |
2.17.1
|
|
|
1cf00d |
|