Skip to content

Commit 371ab17

Browse files
committed
fixed linting
1 parent f5fdca1 commit 371ab17

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎workflows/test_max_alternatives_bug_fix.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
else:
3939
print(f' ❌ FAIL: Expected 1 absolute XPath, got {len(result_1)}')
4040
if len(result_1) > 0 and result_1[0] != absolute_xpath:
41-
print(f' ❌ FAIL: First XPath is not the absolute one!')
41+
print(' ❌ FAIL: First XPath is not the absolute one!')
4242

4343
# Test max_alternatives = 2
4444
print('\n📋 Test 2: max_alternatives=2')
@@ -55,16 +55,16 @@
5555
test_2_pass = (
5656
len(result_2) == 2
5757
and result_2[-1] == absolute_xpath # Last is absolute
58-
and result_2[0] != absolute_xpath # First is optimized (different from absolute)
58+
and result_2[0] != absolute_xpath # First is optimized (different from absolute)
5959
)
6060
if test_2_pass:
6161
print(' ✅ PASS: Exactly 2 XPaths (1 optimized + 1 absolute)')
6262
else:
6363
print(f' ❌ FAIL: Expected 2 XPaths (1 optimized + 1 absolute), got {len(result_2)}')
6464
if len(result_2) >= 2 and result_2[-1] != absolute_xpath:
65-
print(f' ❌ FAIL: Last XPath is not the absolute fallback!')
65+
print(' ❌ FAIL: Last XPath is not the absolute fallback!')
6666
if len(result_2) >= 1 and result_2[0] == absolute_xpath:
67-
print(f' ❌ FAIL: First XPath should be optimized, not absolute!')
67+
print(' ❌ FAIL: First XPath should be optimized, not absolute!')
6868

6969
# Test max_alternatives = 3
7070
print('\n📋 Test 3: max_alternatives=3')
@@ -81,16 +81,16 @@
8181
optimized_count = sum(1 for xpath in result_3[:-1] if xpath != absolute_xpath)
8282
test_3_pass = (
8383
len(result_3) == 3
84-
and result_3[-1] == absolute_xpath # Last is absolute
85-
and optimized_count >= 1 # At least 1 optimized (ideally 2)
84+
and result_3[-1] == absolute_xpath # Last is absolute
85+
and optimized_count >= 1 # At least 1 optimized (ideally 2)
8686
and all(xpath != absolute_xpath for xpath in result_3[:-1]) # All except last are different from absolute
8787
)
8888
if test_3_pass:
8989
print(f' ✅ PASS: Exactly 3 XPaths ({optimized_count} optimized + 1 absolute)')
9090
else:
9191
print(f' ❌ FAIL: Expected 3 XPaths (2 optimized + 1 absolute), got {len(result_3)}')
9292
if len(result_3) >= 3 and result_3[-1] != absolute_xpath:
93-
print(f' ❌ FAIL: Last XPath is not the absolute fallback!')
93+
print(' ❌ FAIL: Last XPath is not the absolute fallback!')
9494
if len(result_3) >= 2:
9595
non_optimized = sum(1 for xpath in result_3[:-1] if xpath == absolute_xpath)
9696
if non_optimized > 0:

0 commit comments

Comments
 (0)