Skip to content
Snippets Groups Projects
Commit 3e73bf89 authored by Andrey Rakhmatullin's avatar Andrey Rakhmatullin
Browse files

Fix running tests without Python2.

parent b697464a
No related branches found
Tags debian/0.98.6-3
No related merge requests found
From: Andrey Rahmatullin <wrar@debian.org>
Date: Sat, 10 Aug 2019 11:55:22 +0500
Subject: Use the python3 binary in cmdline tests.
---
tests/tests_cmd_lines.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/tests_cmd_lines.py b/tests/tests_cmd_lines.py
index 0bfacb1..9f979cb 100644
--- a/tests/tests_cmd_lines.py
+++ b/tests/tests_cmd_lines.py
@@ -25,25 +25,25 @@ class TestCmdLines(unittest.TestCase):
cls.srv.start()
def test_uals(self):
- s = subprocess.check_output(["python", "tools/uals", "--url", self.srv_url])
+ s = subprocess.check_output(["python3", "tools/uals", "--url", self.srv_url])
self.assertIn(b"i=85", s)
self.assertNotIn(b"i=89", s)
self.assertNotIn(b"1.999", s)
- s = subprocess.check_output(["python", "tools/uals", "--url", self.srv_url, "-d", "3"])
+ s = subprocess.check_output(["python3", "tools/uals", "--url", self.srv_url, "-d", "3"])
self.assertIn(b"1.999", s)
def test_uaread(self):
- s = subprocess.check_output(["python", "tools/uaread", "--url", self.srv_url, "--path", "0:Objects,4:directory,4:variable"])
+ s = subprocess.check_output(["python3", "tools/uaread", "--url", self.srv_url, "--path", "0:Objects,4:directory,4:variable"])
self.assertIn(b"1.999", s)
def test_uawrite(self):
- s = subprocess.check_output(["python", "tools/uawrite", "--url", self.srv_url, "--path", "0:Objects,4:directory,4:variable2", "1.789"])
- s = subprocess.check_output(["python", "tools/uaread", "--url", self.srv_url, "--path", "0:Objects,4:directory,4:variable2"])
+ s = subprocess.check_output(["python3", "tools/uawrite", "--url", self.srv_url, "--path", "0:Objects,4:directory,4:variable2", "1.789"])
+ s = subprocess.check_output(["python3", "tools/uaread", "--url", self.srv_url, "--path", "0:Objects,4:directory,4:variable2"])
self.assertIn(b"1.789", s)
self.assertNotIn(b"1.999", s)
def test_uadiscover(self):
- s = subprocess.check_output(["python", "tools/uadiscover", "--url", self.srv_url])
+ s = subprocess.check_output(["python3", "tools/uadiscover", "--url", self.srv_url])
self.assertIn(b"opc.tcp://127.0.0.1", s)
self.assertIn(b"FreeOpcUa", s)
self.assertIn(b"urn:freeopcua:python:server", s)
Description: add shebang to example shell script
Author: W. Martin Borgert <debacle@debian.org>
From: "W. Martin Borgert" <debacle@debian.org>
Date: Sat, 10 Aug 2019 11:54:41 +0500
Subject: add shebang to example shell script
Origin: vendor
Last-Update: 2018-03-11
Last-Update: 2018-03-11
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
examples/generate_certificate.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/examples/generate_certificate.sh b/examples/generate_certificate.sh
index 10fbc54..01c77c5 100755
--- a/examples/generate_certificate.sh
+++ b/examples/generate_certificate.sh
@@ -1,2 +1,4 @@
......
Description: disable failing test temporarily
Author: W. Martin Borgert <debacle@debian.org>
From: "W. Martin Borgert" <debacle@debian.org>
Date: Sat, 10 Aug 2019 11:54:41 +0500
Subject: disable failing test temporarily
Origin: vendor
Last-Update: 2019-02-11
Last-Update: 2019-02-11
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
tests/tests_subscriptions.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/tests_subscriptions.py b/tests/tests_subscriptions.py
index 0a894ac..1e4d682 100644
--- a/tests/tests_subscriptions.py
+++ b/tests/tests_subscriptions.py
@@ -4,6 +4,8 @@
@@ -4,6 +4,8 @@ import time
from datetime import datetime, timedelta
from copy import copy
......@@ -15,7 +23,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
import opcua
from opcua import ua
@@ -99,6 +101,7 @@
@@ -99,6 +101,7 @@ class SubscriptionTests(object):
for s in subs:
s.delete()
......@@ -23,7 +31,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
def test_subscription_count(self):
myhandler = MySubHandlerCounter()
sub = self.opc.create_subscription(1, myhandler)
@@ -113,6 +116,7 @@
@@ -113,6 +116,7 @@ class SubscriptionTests(object):
self.assertEqual(myhandler.datachange_count, nb + 1)
sub.delete()
......
disable_failing_test.patch
add-shebang.patch
0003-Use-the-python3-binary-in-cmdline-tests.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment