Fix issues related to py312 compatibility

Summary of changes:
- Add py312 section to tox.ini [testenv]
- Bump flake8 from 3.9.2 to 7.1.1
- Fix unit test typo

Change-Id: I6faf496b9e6b982ef070d37527b3411333b21e7e
This commit is contained in:
Myles Penner
2024-08-20 21:16:42 +00:00
parent 13c135ec48
commit 7929187758
2 changed files with 9 additions and 2 deletions

View File

@@ -49,6 +49,13 @@ commands =
{toxinidir}/rename.sh
charmcraft clean
[testenv:py312]
basepython = python3.12
deps =
-c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:py310]
basepython = python3.10
deps =
@@ -65,7 +72,7 @@ deps =
[testenv:pep8]
basepython = python3
deps = flake8==3.9.2
deps = flake8==7.1.1
git+https://github.com/juju/charm-tools.git
commands = flake8 {posargs} hooks unit_tests tests actions lib files
charm-proof

View File

@@ -290,7 +290,7 @@ class TestCinderContext(CharmTestCase):
'mon_hosts': 'ceph-mon-0 ceph-mon-1'
}
)
self.assertEquals(
self.assertEqual(
contexts.CephReplicationDeviceContext.interfaces,
['ceph-replication-device']
)