Skip to content

Commit f55036d

Browse files
committed
Enable tracemalloc
1 parent b2a71a9 commit f55036d

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.github/workflows/integration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
with:
7474
python-version: ${{ matrix.python-version }}
7575
cache: 'pip'
76-
- name: run tests
76+
- name: Run tests
7777
run: |
7878
pip install -U setuptools wheel
7979
pip install -r requirements.txt

tests/conftest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import argparse
22
import random
33
import time
4+
import tracemalloc
45
from typing import Callable, TypeVar
56
from unittest import mock
67
from unittest.mock import Mock
@@ -72,6 +73,16 @@ def format_usage(self):
7273
return " | ".join(self.option_strings)
7374

7475

76+
@pytest.fixture(scope="session", autouse=True)
77+
def enable_tracemalloc():
78+
"""
79+
Enable tracemalloc while tests are being executed.
80+
"""
81+
tracemalloc.start()
82+
yield
83+
tracemalloc.stop()
84+
85+
7586
def pytest_addoption(parser):
7687
parser.addoption(
7788
"--redis-url",

tests/test_connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def test_tcp_ssl_version_mismatch(tcp_address):
135135
tcp_address,
136136
certfile=certfile,
137137
keyfile=keyfile,
138-
maximum_ssl_version=ssl.PROTOCOL_TLSv1_2,
138+
maximum_ssl_version=ssl.TLSVersion.TLSv1_2,
139139
)
140140

141141

0 commit comments

Comments
 (0)