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

upgrade to pytest 8 #1054

Merged
merged 1 commit into from
Nov 22, 2024
Merged

upgrade to pytest 8 #1054

merged 1 commit into from
Nov 22, 2024

Conversation

selfisekai
Copy link
Contributor

No description provided.

@ppolewicz
Copy link
Collaborator

Hey, are you going to move it forward from draft?

@selfisekai
Copy link
Contributor Author

selfisekai commented Nov 4, 2024

i put it as draft because one test always fails, but i'm afraid it's not getting fixed pytest-dev/pytest-forked#67

@mlech-reef
Copy link
Collaborator

@selfisekai, but the CI passed - even test_autocomplete_cache.py. Where exactly you see the problem?

@selfisekai
Copy link
Contributor Author

interesting, it does pass for me locally on pdm run nox -s unit-3.12, but not on pdm run pytest -k 'not integration':

self = <_pytest.runner.SetupState object at 0x7f06f7f698e0>, item = <Function test_add_or_update_shell_section_new_section>

    def setup(self, item: Item) -> None:
        """Setup objects along the collector chain to the item."""
        needed_collectors = item.listchain()
    
        # If a collector fails its setup, fail its entire subtree of items.
        # The setup is not retried for each item - the same exception is used.
        for col, (finalizers, exc) in self.stack.items():
>           assert col in needed_collectors, "previous item was not torn down properly"
E           AssertionError: previous item was not torn down properly

.venv/lib/python3.12/site-packages/_pytest/runner.py:505: AssertionError

@selfisekai selfisekai marked this pull request as ready for review November 6, 2024 23:43
@mlech-reef
Copy link
Collaborator

@selfisekai the problem is order of tests in test_autocomplete_cache.py. It is a mix of forked and non-forked tests, where non-forked are not the last ones in the file. And this is a problem according to pytest-dev/pytest-forked/issues/67

I propose to move test_pickle_store and test_unpickle to the separate module, e.g. called test/unit/_cli/test_pickle.py. And then, everything should be fine.

BR/ Maciek

@ppolewicz
Copy link
Collaborator

@selfisekai 3.8 tests fail, from the logs it looks like it's something that should be easy to fix (type annotation?)

@mpnowacki-reef mpnowacki-reef merged commit 0fe3fe0 into Backblaze:master Nov 22, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants