Skip to content

Commit 484e5cc

Browse files
fixed pylint issue
1 parent f80bcf8 commit 484e5cc

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

tests/e2e-test/pages/HomePage.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import os.path
44

55
from base.base import BasePage
6+
67
from config.constants import URL
78

89
from playwright.sync_api import expect
@@ -51,7 +52,6 @@ class HomePage(BasePage):
5152
ERROR_MSG_UNABLE_TO_PROCESS = "//span[normalize-space()='Unable to process the file']"
5253
HARMFUL_FILE_2 = "//span[.='harmful_content_2 2.sql']"
5354

54-
5555
def __init__(self, page):
5656
self.page = page
5757

@@ -92,7 +92,7 @@ def upload_all_files(self):
9292
file_chooser = fc_info.value
9393
current_working_dir = os.getcwd()
9494
testdata_dir = os.path.join(current_working_dir, "testdata/valid_files")
95-
95+
9696
# Get all files from testdata/valid_files folder
9797
all_files = []
9898
if os.path.exists(testdata_dir) and os.path.isdir(testdata_dir):
@@ -138,7 +138,7 @@ def remove_first_three_files_and_validate_count(self):
138138
remove_buttons = self.page.locator(self.REMOVE_FILE_BTN)
139139

140140
# Remove first three files
141-
for i in range(3):
141+
for _i in range(3):
142142
remove_buttons.first.click()
143143
self.page.wait_for_timeout(2000)
144144

@@ -264,12 +264,12 @@ def upload_harmful_file_and_validate(self):
264264
self.page.wait_for_timeout(10000)
265265
self.page.wait_for_load_state("networkidle")
266266
logger.info("Translation process started")
267-
267+
268268
# Click on harmful_content_2 2.sql file
269269
self.page.locator(self.HARMFUL_FILE_2).click()
270270
self.page.wait_for_timeout(2000)
271271
logger.info("Clicked on harmful_content_2 2.sql file")
272-
272+
273273
# Validate error message is visible
274274
try:
275275
expect(self.page.locator(self.ERROR_MSG_UNABLE_TO_PROCESS)).to_be_visible(timeout=200000)

tests/e2e-test/tests/conftest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,25 +86,25 @@ def pytest_runtest_makereport(item, call):
8686
test_name = item.name.replace(" ", "_").replace("/", "_")
8787
screenshot_name = f"screenshot_{test_name}_{timestamp}.png"
8888
screenshot_path = os.path.join(SCREENSHOTS_DIR, screenshot_name)
89-
89+
9090
# Take screenshot
9191
page.screenshot(path=screenshot_path)
92-
92+
9393
# Add screenshot link to report
9494
if not hasattr(report, 'extra'):
9595
report.extra = []
96-
96+
9797
# Add screenshot as a link in the Links column
9898
# Use relative path from report.html location
9999
relative_path = os.path.relpath(
100100
screenshot_path,
101101
os.path.dirname(os.path.abspath("report.html"))
102102
)
103-
103+
104104
# pytest-html expects this format for extras
105105
from pytest_html import extras
106106
report.extra.append(extras.url(relative_path, name='Screenshot'))
107-
107+
108108
logging.info("Screenshot saved: %s", screenshot_path)
109109
except Exception as exc: # pylint: disable=broad-exception-caught
110110
logging.error("Failed to capture screenshot: %s", str(exc))

0 commit comments

Comments
 (0)