Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to create fix for PytestUnittestRaisesAssertion: Unable to use existing symbol due to late binding #6842

Closed
qarmin opened this issue Aug 24, 2023 · 2 comments
Labels
bug Something isn't working fuzzer Surfaced via fuzzing.

Comments

@qarmin
Copy link

qarmin commented Aug 24, 2023

Ruff 0.0.285 (latest changes from main branch)

ruff  *.py --select ALL --no-cache

file content:

import contextlib


class C:
    def test_shared_proxy_without_callback(self):
        class MyObj:
                nonlocal obj
        with self.assertRaises(TypeError), contextlib.suppress(StopIteration):
            next(it)

from test import mapping_tests

import pytest


class WeakValueDictionaryTestCase(mapping_tests.BasicTestMappingProtocol):
        with pytest.raises(TypeError):
            weakref.finalize(a, func=fin, arg=1)

error:

Failed to create fix for PytestUnittestRaisesAssertion: Unable to use existing symbol due to late binding

PY_FILE_TEST_102810345207062.py.zip

@charliermarsh
Copy link
Member

This is expected, so we should find a way to suppress these.

@qarmin
Copy link
Author

qarmin commented Oct 1, 2023

File no longer parsable

@qarmin qarmin closed this as completed Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fuzzer Surfaced via fuzzing.
Projects
None yet
Development

No branches or pull requests

2 participants