Skip to content

Commit f38888a

Browse files
committed
[ci] Update scripts syntax at least py3.8
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 3dddb7d commit f38888a

File tree

5 files changed

+81
-81
lines changed

5 files changed

+81
-81
lines changed

tests/SeleniumTests/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
TEST_ADD_CAPS_RECORD_VIDEO = os.environ.get('TEST_ADD_CAPS_RECORD_VIDEO', 'true').lower() == 'true'
3333
TEST_CUSTOM_SPECIFIC_NAME = os.environ.get('TEST_CUSTOM_SPECIFIC_NAME', 'false').lower() == 'true'
3434

35-
SELENIUM_GRID_URL = "%s://%s:%s" % (SELENIUM_GRID_PROTOCOL,SELENIUM_GRID_HOST,SELENIUM_GRID_PORT)
35+
SELENIUM_GRID_URL = f"{SELENIUM_GRID_PROTOCOL}://{SELENIUM_GRID_HOST}:{SELENIUM_GRID_PORT}"
3636
CLIENT_CONFIG = ClientConfig(
3737
remote_server_addr=SELENIUM_GRID_URL,
3838
keep_alive=True,

tests/SmokeTests/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def smoke_test_container(self, port):
3333
while current_attempts < max_attempts:
3434
current_attempts = current_attempts + 1
3535
try:
36-
grid_url_status = '%s://%s:%s/status' % (SELENIUM_GRID_PROTOCOL, SELENIUM_GRID_HOST, port)
36+
grid_url_status = f'{SELENIUM_GRID_PROTOCOL}://{SELENIUM_GRID_HOST}:{port}/status'
3737
if SELENIUM_GRID_USERNAME and SELENIUM_GRID_PASSWORD:
3838
response = requests.get(grid_url_status, auth=HTTPBasicAuth(SELENIUM_GRID_USERNAME, SELENIUM_GRID_PASSWORD))
3939
else:
@@ -55,7 +55,7 @@ def smoke_test_container(self, port):
5555

5656

5757
def client_verify_cert(self, port):
58-
grid_url_status = '%s://%s:%s/status' % (SELENIUM_GRID_PROTOCOL, SELENIUM_GRID_HOST, port)
58+
grid_url_status = f'{SELENIUM_GRID_PROTOCOL}://{SELENIUM_GRID_HOST}:{port}/status'
5959
cert_path = os.environ.get("REQUESTS_CA_BUNDLE")
6060
response = requests.get(grid_url_status, verify=cert_path, auth=HTTPBasicAuth(SELENIUM_GRID_USERNAME, SELENIUM_GRID_PASSWORD))
6161

tests/build-backward-compatible/builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
def load_template(yaml_file):
99
try:
10-
with open(yaml_file, 'r') as file:
10+
with open(yaml_file) as file:
1111
documents = yaml.safe_load(file)
1212
return documents
1313
except yaml.YAMLError as error:

0 commit comments

Comments
 (0)