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

Unit tests failing for python3.10 #712

Open
gabrielcocenza opened this issue May 27, 2022 · 3 comments
Open

Unit tests failing for python3.10 #712

gabrielcocenza opened this issue May 27, 2022 · 3 comments

Comments

@gabrielcocenza
Copy link
Contributor

Unit tests are failing for the python3.10 as it is possible to see here and in this pastebin.

Apparently, the sequence of the tests that run has changed from one python version to another and this might break some tests.

@ajkavanagh
Copy link
Contributor

Apparently, the sequence of the tests that run has changed from one python version to another and this might break some tests.

So, this probably means that the tests are not properly isolated. All three errors look like either a mock failure of some kind.

@gabrielcocenza
Copy link
Contributor Author

So, this probably means that the tests are not properly isolated. All three errors look like either a mock failure of some kind.

That is right. I just looked at the test_ceph_context_ec_pool_no_rbd_pool and the problem there is that is missing the env var for JUJU_UNIT_NAME that was happening on test test_save_scriptrc. Now that the sequence of tests changed, setting this env var on the test that is failing is necessary.

@ajkavanagh
Copy link
Contributor

That is right. I just looked at the test_ceph_context_ec_pool_no_rbd_pool and the problem there is that is missing the env var for JUJU_UNIT_NAME that was happening on test test_save_scriptrc. Now that the sequence of tests changed, setting this env var on the test that is failing is necessary.

Indeed, the correct thing to do is to ensure that all of the tests are isolated so that run order does not affect the tests. Some tests may be leaking which means that mocking is not done in those (currently) not failing tests.

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

No branches or pull requests

2 participants