aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2024-09-06 10:58:24 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2024-09-06 12:02:20 +0200
commite8c1a3da8d98f09a1b455d6eebe17c1345e7bfbc (patch)
tree3dbc5377c1d31336851525a14bce1e8d8c6ecde1 /xtesting
parenta1ba6fb90620f04ef49f5d29d5ce0e2d812e37b2 (diff)
Update to Alpine 3.20
Please note that it also updates python to 3.12. Change-Id: I715194304b37b9cd52affa998a94ba5ec52e7732 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'xtesting')
-rw-r--r--xtesting/ci/run_tests.py2
-rw-r--r--xtesting/ci/testcases.yaml8
-rw-r--r--xtesting/core/testcase.py4
-rw-r--r--xtesting/tests/unit/ci/test_run_tests.py2
-rw-r--r--xtesting/tests/unit/core/test_vnf.py12
5 files changed, 14 insertions, 14 deletions
diff --git a/xtesting/ci/run_tests.py b/xtesting/ci/run_tests.py
index 5b0baf03..0f77f9da 100644
--- a/xtesting/ci/run_tests.py
+++ b/xtesting/ci/run_tests.py
@@ -302,7 +302,7 @@ class Runner():
if test_case.is_skipped:
result = 'SKIP'
else:
- result = 'PASS' if(test_case.is_successful(
+ result = 'PASS' if (test_case.is_successful(
) == test_case.EX_OK) else 'FAIL'
msg.add_row(
[test_case.case_name, test_case.project_name,
diff --git a/xtesting/ci/testcases.yaml b/xtesting/ci/testcases.yaml
index 59845e60..513a8417 100644
--- a/xtesting/ci/testcases.yaml
+++ b/xtesting/ci/testcases.yaml
@@ -51,7 +51,7 @@ tiers:
args:
suites:
- >-
- /usr/lib/python3.10/site-packages/xtesting/samples/HelloWorld.robot
+ /usr/lib/python3.12/site-packages/xtesting/samples/HelloWorld.robot
variable:
- 'var01:foo'
- 'var02:bar'
@@ -66,7 +66,7 @@ tiers:
name: behaveframework
args:
suites:
- - /usr/lib/python3.10/site-packages/xtesting/samples/features
+ - /usr/lib/python3.12/site-packages/xtesting/samples/features
tags:
- foo
- case_name: eighth
@@ -79,7 +79,7 @@ tiers:
run:
name: ansible
args:
- private_data_dir: /usr/lib/python3.10/site-packages/xtesting/samples
+ private_data_dir: /usr/lib/python3.12/site-packages/xtesting/samples
playbook: helloworld.yml
- case_name: nineth
project_name: xtesting
@@ -91,4 +91,4 @@ tiers:
run:
name: pytest
args:
- dir: /usr/lib/python3.10/site-packages/xtesting/samples/fourth.py
+ dir: /usr/lib/python3.12/site-packages/xtesting/samples/fourth.py
diff --git a/xtesting/core/testcase.py b/xtesting/core/testcase.py
index 380adc5e..4c02e1ca 100644
--- a/xtesting/core/testcase.py
+++ b/xtesting/core/testcase.py
@@ -79,7 +79,7 @@ class TestCase(metaclass=abc.ABCMeta):
if self.is_skipped:
result = 'SKIP'
else:
- result = 'PASS' if(self.is_successful(
+ result = 'PASS' if (self.is_successful(
) == TestCase.EX_OK) else 'FAIL'
msg = prettytable.PrettyTable(
header_style='upper', padding_width=5,
@@ -106,7 +106,7 @@ class TestCase(metaclass=abc.ABCMeta):
assert self.stop_time
if self.stop_time < self.start_time:
return "XX:XX"
- return(
+ return (
f"{str(int(self.stop_time - self.start_time) // 60).zfill(2)}:"
f"{str(int(self.stop_time - self.start_time) % 60).zfill(2)}")
diff --git a/xtesting/tests/unit/ci/test_run_tests.py b/xtesting/tests/unit/ci/test_run_tests.py
index e2a2712c..1cf300e7 100644
--- a/xtesting/tests/unit/ci/test_run_tests.py
+++ b/xtesting/tests/unit/ci/test_run_tests.py
@@ -95,7 +95,7 @@ class RunTestsTesting(unittest.TestCase):
pass
envfile = 'rc_file'
with mock.patch('builtins.open',
- mock.mock_open(read_data=msg)) as mock_method,\
+ mock.mock_open(read_data=msg)) as mock_method, \
mock.patch('os.path.isfile', return_value=True):
mock_method.return_value.__iter__ = lambda self: iter(
self.readline, '')
diff --git a/xtesting/tests/unit/core/test_vnf.py b/xtesting/tests/unit/core/test_vnf.py
index 34380a69..1c60d899 100644
--- a/xtesting/tests/unit/core/test_vnf.py
+++ b/xtesting/tests/unit/core/test_vnf.py
@@ -41,7 +41,7 @@ class VnfBaseTesting(unittest.TestCase):
mock_method.assert_called_with()
def test_run_deploy_vnf_exc(self):
- with mock.patch.object(self.test, 'prepare'),\
+ with mock.patch.object(self.test, 'prepare'), \
mock.patch.object(self.test, 'deploy_orchestrator',
return_value=True), \
mock.patch.object(self.test, 'deploy_vnf',
@@ -51,7 +51,7 @@ class VnfBaseTesting(unittest.TestCase):
mock_method.assert_called_with()
def test_run_test_vnf_exc(self):
- with mock.patch.object(self.test, 'prepare'),\
+ with mock.patch.object(self.test, 'prepare'), \
mock.patch.object(self.test, 'deploy_orchestrator',
return_value=True), \
mock.patch.object(self.test, 'deploy_vnf', return_value=True), \
@@ -62,7 +62,7 @@ class VnfBaseTesting(unittest.TestCase):
mock_method.assert_called_with()
def test_run_deploy_orch_ko(self):
- with mock.patch.object(self.test, 'prepare'),\
+ with mock.patch.object(self.test, 'prepare'), \
mock.patch.object(self.test, 'deploy_orchestrator',
return_value=False), \
mock.patch.object(self.test, 'deploy_vnf',
@@ -73,7 +73,7 @@ class VnfBaseTesting(unittest.TestCase):
testcase.TestCase.EX_TESTCASE_FAILED)
def test_run_vnf_deploy_ko(self):
- with mock.patch.object(self.test, 'prepare'),\
+ with mock.patch.object(self.test, 'prepare'), \
mock.patch.object(self.test, 'deploy_orchestrator',
return_value=True), \
mock.patch.object(self.test, 'deploy_vnf',
@@ -84,7 +84,7 @@ class VnfBaseTesting(unittest.TestCase):
testcase.TestCase.EX_TESTCASE_FAILED)
def test_run_vnf_test_ko(self):
- with mock.patch.object(self.test, 'prepare'),\
+ with mock.patch.object(self.test, 'prepare'), \
mock.patch.object(self.test, 'deploy_orchestrator',
return_value=True), \
mock.patch.object(self.test, 'deploy_vnf',
@@ -95,7 +95,7 @@ class VnfBaseTesting(unittest.TestCase):
testcase.TestCase.EX_TESTCASE_FAILED)
def test_run_default(self):
- with mock.patch.object(self.test, 'prepare'),\
+ with mock.patch.object(self.test, 'prepare'), \
mock.patch.object(self.test, 'deploy_orchestrator',
return_value=True), \
mock.patch.object(self.test, 'deploy_vnf',