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

Fix asserts for called once in Python 3.12 #885

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Jul 9, 2023

    E               AttributeError: 'called_once_with' is not a valid assertion. Use a spec for the mock if 'called_once_with' is meant to be an attribute.. Did you mean: 'assert_called_once_with'?

    FAILED tests/TestBackend.py::test__onSocketStateChanged_listening - Attribute...
    FAILED tests/TestBackend.py::test_onSocketStateChanged_connected - AttributeE...
    FAILED tests/Jobs/TestJob.py::test_start - AttributeError: 'called_once_with'...
    FAILED tests/Jobs/TestJob.py::test_cancel - AttributeError: 'called_once_with...

    E               AttributeError: 'called_once_with' is not a valid assertion. Use a spec for the mock if 'called_once_with' is meant to be an attribute.. Did you mean: 'assert_called_once_with'?

    FAILED tests/TestBackend.py::test__onSocketStateChanged_listening - Attribute...
    FAILED tests/TestBackend.py::test_onSocketStateChanged_connected - AttributeE...
    FAILED tests/Jobs/TestJob.py::test_start - AttributeError: 'called_once_with'...
    FAILED tests/Jobs/TestJob.py::test_cancel - AttributeError: 'called_once_with...
@github-actions github-actions bot added the PR: Community Contribution 👑 Community Contribution PR's label Jul 9, 2023
@hroncok
Copy link
Contributor Author

hroncok commented Jul 9, 2023

This was needed in Fedora to update to Python 3.12 (together with using https://pypi.org/project/zombie-imp/ to workaround #765). Unfortunately, one of the asserts actually failed, hence I needed to comment it out. I don't think this ever asserted anything, so perhaps it was a wrong assert... ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Community Contribution 👑 Community Contribution PR's
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant