Fix issues related to py312 compatibility
Summary of changes: - Bump flake8 from 3.9.2 to 7.1.1 - Add py312 section to tox.ini [testenv] - Minor change to unit test - Update zuul.yaml to use openstack-python3-charm-jobs Change-Id: I3f2d8bce2c38259eebc6182d24a4812210152c4f
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
- project:
|
||||
templates:
|
||||
- openstack-python3-charm-yoga-jobs
|
||||
- openstack-python3-charm-jobs
|
||||
- openstack-cover-jobs
|
||||
|
||||
7
tox.ini
7
tox.ini
@@ -70,6 +70,11 @@ basepython = python3.8
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = stestr run --slowest {posargs}
|
||||
|
||||
[testenv:py312]
|
||||
basepython = python3.12
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = stestr run --slowest {posargs}
|
||||
|
||||
[testenv:py310]
|
||||
basepython = python3.10
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
@@ -77,7 +82,7 @@ commands = stestr run --slowest {posargs}
|
||||
|
||||
[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} src unit_tests
|
||||
|
||||
|
||||
@@ -260,9 +260,10 @@ class TestPrometheusMySQLExporterHandlers(test_utils.PatchHelper):
|
||||
def test_stop_prometheus_exporter_service(self):
|
||||
handlers.stop_prometheus_exporter_service()
|
||||
self.service_stop.assert_called_once_with(self._svc_name)
|
||||
self.remove_state.has_calls(
|
||||
expected_calls = [
|
||||
mock.call("snap.prometheus-exporter.configed"),
|
||||
mock.call("snap.prometheus-exporter.started"),
|
||||
)
|
||||
mock.call("snap.prometheus-exporter.started")
|
||||
]
|
||||
self.remove_state.assert_has_calls(expected_calls)
|
||||
self.status_set.assert_called_once_with(
|
||||
"active", "Stop prometheus exporter service")
|
||||
|
||||
Reference in New Issue
Block a user