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
The only thing which seems to be missing now is to fix the tests in executing.
❯ pytest
============================================================================================================= test session starts =============================================================================================================
platform linux -- Python 3.12.6, pytest-8.4.0.dev100+g5c25c5929, pluggy-1.5.0
rootdir: /home/frank/projects/executing
configfile: pyproject.toml
collected 209 items
tests/test_ipython.py .. [ 0%]
tests/test_main.py ..................ss...............................................................................................................................................................sssssssssssssss. [ 94%]
tests/test_pytest.py .....F...... [100%]
================================================================================================================== FAILURES ===================================================================================================================
___________________________________________________________________________________________________________ test_exception_catching ___________________________________________________________________________________________________________
def test_exception_catching():
frame = inspect.currentframe()
executing.executing.TESTING = True # this is already the case in all other tests
# Sanity check that this operation usually raises an exception.
# This actually depends on executing not working in the presence of pytest.
with pytest.raises((NotOneValueFound, KnownIssue)):
> assert Source.executing(frame).node is None
E AssertionError: assert <ast.Call object at 0x7f7999d49390> is None
E + where <ast.Call object at 0x7f7999d49390> = <executing.executing.Executing object at 0x7f799a0a00b0>.node
E + where <executing.executing.Executing object at 0x7f799a0a00b0> = executing(<frame at 0x7f799a2420e0, file '/home/frank/projects/executing/tests/test_pytest.py', line 131, code test_exception_catching>)
E + where executing = Source.executing
tests/test_pytest.py:131: AssertionError
============================================================================================================== warnings summary ===============================================================================================================
tests/test_main.py::test_small_samples[4851dc1b626a95e97dbe0c53f96099d165b755dd1bd552c6ca771f7bca6d30f5.py]
/home/frank/projects/executing/tests/small_samples/4851dc1b626a95e97dbe0c53f96099d165b755dd1bd552c6ca771f7bca6d30f5.py:16: SyntaxWarning: "is" with 'int' literal. Did you mean "=="?
if 1 < 1 > 1 == 1 >= 1 <= 1 != 1 in 1 not in 1 is 1 is not 1:
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================================================================================================== short test summary info ===========================================================================================================
FAILED tests/test_pytest.py::test_exception_catching - AssertionError: assert <ast.Call object at 0x7f7999d49390> is None
============================================================================================ 1 failed, 191 passed, 17 skipped, 1 warning in 7.26s =============================================================================================
The text was updated successfully, but these errors were encountered:
I fixed the source positions in pytest which will allow executing to find the correct nodes (if used with the next pytest release).
pytest-dev/pytest#12815
The only thing which seems to be missing now is to fix the tests in executing.
The text was updated successfully, but these errors were encountered: