You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Fedora we have RobotFramework tests running for upcoming Fedora 41 using Python 3.13.03 in a side tag.
While running the unit tests (version 7.0) I have a new failure in utils:
FAIL: test_remove_entries_with_lambda_and_multiple_entries
(test_error.TestRemoveRobotEntriesFromTraceback.test_remove_entries_with_lambda_and_multiple_entries)
----------------------------------------------------------------------
======================================================================
FAIL: test_remove_entries_with_lambda_and_multiple_entries (test_error.TestRemoveRobotEntriesFromTraceback.test_remove_entries_with_lambda_and_multiple_entries)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/robotframework-7.0/utest/utils/test_error.py", line 107, in test_remove_entries_with_lambda_and_multiple_entries
self._verify_traceback(r'''
~~~~~~~~~~~~~~~~~~~~~~^^^^^
Traceback \(most recent call last\):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
1/0
^^^
'''.strip(), assert_raises, AssertionError, raising_lambda)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/robotframework-7.0/utest/utils/test_error.py", line 133, in _verify_traceback
raise AssertionError('\nExpected:\n%s\n\nActual:\n%s' % (expected, tb))
AssertionError:
Expected:
Traceback \(most recent call last\):
File ".*", line \d+, in <lambda.*>
raising_lambda = lambda: raises\(\)
File ".*", line \d+, in raises
1/0
Actual:
Traceback (most recent call last):
File "/builddir/build/BUILD/robotframework-7.0/utest/utils/test_error.py", line 106, in <lambda>
raising_lambda = lambda: raises()
~~~~~~^^
File "/builddir/build/BUILD/robotframework-7.0/utest/utils/test_error.py", line 105, in raises
1/0
~^~
ZeroDivisionError: division by zero
----------------------------------------------------------------------
Ran 635 tests in 0.577s
FAILED (failures=1)
Looking at the output and playing a bit around the solution to me looks like changing the test filter (line in test_error.py) from:
# Remove lines indicating error location with `^^^^` used by Python 3.11+.
tb = '\n'.join(line for line in tb.splitlines() if line.strip('^ '))
To:
# Remove lines indicating error location with `^^^^` used by Python 3.11+ and `~~~~^` variants in Python 3.13+.
tb = '\n'.join(line for line in tb.splitlines() if line.strip('^~ '))
Which filters also the error indicators with ~ that seem to be new.
This makes the test pass, I hope/believe without breaking in previous versions.
If the proposal makes sense I can of course open a MR!
Thanks!
F.
The text was updated successfully, but these errors were encountered:
The fix looks good to me. There will probably be more work to fully support Python 3.13 (removal of telnetlib is likely to cause problems), but getting this issue fixed already now is anyway a good idea. I've typically started testing with new Python versions when they are in beta.
In Fedora we have RobotFramework tests running for upcoming Fedora 41 using Python 3.13.03 in a side tag.
While running the unit tests (version 7.0) I have a new failure in utils:
Looking at the output and playing a bit around the solution to me looks like changing the test filter (line in test_error.py) from:
To:
Which filters also the error indicators with
~
that seem to be new.This makes the test pass, I hope/believe without breaking in previous versions.
If the proposal makes sense I can of course open a MR!
Thanks!
F.
The text was updated successfully, but these errors were encountered: