From 7934dcabbc3c2b585e8d3f8fcee7020ba26f1687 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Tue, 21 Feb 2023 17:21:29 +0000 Subject: Tests: switched to using f-strings. Previously, it was necessary to support older versions of Python for compatibility. F-strings were released in Python 3.6. Python 3.5 was marked as unsupported by the end of 2020, so now it's possible to start using f-strings safely for better readability and performance. --- test/test_python_environment.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/test_python_environment.py') diff --git a/test/test_python_environment.py b/test/test_python_environment.py index 2d7d1595..bce72c4d 100644 --- a/test/test_python_environment.py +++ b/test/test_python_environment.py @@ -38,7 +38,7 @@ class TestPythonEnvironment(TestApplicationPython): 'Connection': 'close', } )['body'] - == 'val1,' + == 'val1' ), 'set' self.conf({"var": "val2"}, 'applications/environment/environment') @@ -51,7 +51,7 @@ class TestPythonEnvironment(TestApplicationPython): 'Connection': 'close', } )['body'] - == 'val2,' + == 'val2' ), 'update' def test_python_environment_replace(self): @@ -67,7 +67,7 @@ class TestPythonEnvironment(TestApplicationPython): 'Connection': 'close', } )['body'] - == 'val1,' + == 'val1' ), 'set' self.conf({"var2": "val2"}, 'applications/environment/environment') @@ -80,7 +80,7 @@ class TestPythonEnvironment(TestApplicationPython): 'Connection': 'close', } )['body'] - == 'val2,' + == 'val2' ), 'replace' def test_python_environment_clear(self): @@ -99,7 +99,7 @@ class TestPythonEnvironment(TestApplicationPython): 'Connection': 'close', } )['body'] - == 'val1,val2,' + == 'val1,val2' ), 'set' self.conf({}, 'applications/environment/environment') @@ -138,7 +138,7 @@ class TestPythonEnvironment(TestApplicationPython): 'Connection': 'close', } )['body'] - == '/,' + == '/' ), 'replace default' self.conf({}, 'applications/environment/environment') -- cgit