mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Compatibility with python 3.13 (#3246)
- fix unit tests (logging now uses time.time_ns() instead of time.time()) - update setup.py - update tox.ini - enable unix and behave tests with 3.13 Close https://github.com/patroni/patroni/issues/3243
This commit is contained in:
@@ -425,7 +425,8 @@ class TestKubernetesEndpoints(BaseTestKubernetes):
|
||||
mock_patch.side_effect = [k8s_client.rest.ApiException(409, ''),
|
||||
k8s_client.rest.ApiException(409, ''), mock_namespaced_kind()]
|
||||
mock_read.return_value.metadata.resource_version = '2'
|
||||
with patch('time.time', Mock(side_effect=[0, 0, 100, 200, 0, 0, 0, 0, 0, 100, 200])):
|
||||
mock_time = Mock(side_effect=[0, 0, 100, 200, 0, 0, 0, 0, 0, 100, 200])
|
||||
with patch('time.time', mock_time), patch('time.time_ns', mock_time):
|
||||
self.assertFalse(self.k.update_leader(cluster, '123'))
|
||||
self.assertFalse(self.k.update_leader(cluster, '123'))
|
||||
mock_patch.side_effect = k8s_client.rest.ApiException(409, '')
|
||||
|
||||
Reference in New Issue
Block a user