Add py311 in tox file

Add py311 in tox file

Change-Id: Ib8ceea3a640b8c55d40e1fef5817c43cc4bd1ef9
This commit is contained in:
Hemanth Nakkina 2023-10-20 07:37:09 +05:30
parent 187d3849c1
commit 1b9dd98ed9
2 changed files with 12 additions and 0 deletions

View File

@ -17,6 +17,9 @@
"""Tests for gnocchi charm."""
import ops_sunbeam.test_utils as test_utils
from mock import (
patch,
)
import charm
@ -49,6 +52,10 @@ class TestGnocchiCephOperatorCharm(test_utils.CharmTestCase):
self.harness = test_utils.get_harness(
_GnocchiCephOperatorCharm, container_calls=self.container_calls
)
mock_get_platform = patch(
"charmhelpers.osplatform.get_platform", return_value="ubuntu"
)
mock_get_platform.start()
# clean up events that were dynamically defined,
# otherwise we get issues because they'll be redefined,
@ -67,6 +74,7 @@ class TestGnocchiCephOperatorCharm(test_utils.CharmTestCase):
except AttributeError:
pass
self.addCleanup(mock_get_platform.stop)
self.addCleanup(self.harness.cleanup)
test_utils.add_complete_ingress_relation(self.harness)

View File

@ -72,6 +72,10 @@ deps = {[testenv:py3]deps}
basepython = python3.10
deps = {[testenv:py3]deps}
[testenv:py311]
basepython = python3.11
deps = {[testenv:py3]deps}
[testenv:cover]
basepython = python3
deps = {[testenv:py3]deps}