File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 73
73
with :
74
74
python-version : ${{ matrix.python-version }}
75
75
cache : ' pip'
76
- - name : run tests
76
+ - name : Run tests
77
77
run : |
78
78
pip install -U setuptools wheel
79
79
pip install -r requirements.txt
Original file line number Diff line number Diff line change 1
1
import argparse
2
2
import random
3
3
import time
4
+ import tracemalloc
4
5
from typing import Callable , TypeVar
5
6
from unittest import mock
6
7
from unittest .mock import Mock
@@ -72,6 +73,16 @@ def format_usage(self):
72
73
return " | " .join (self .option_strings )
73
74
74
75
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
+
75
86
def pytest_addoption (parser ):
76
87
parser .addoption (
77
88
"--redis-url" ,
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ def test_tcp_ssl_version_mismatch(tcp_address):
135
135
tcp_address ,
136
136
certfile = certfile ,
137
137
keyfile = keyfile ,
138
- maximum_ssl_version = ssl .PROTOCOL_TLSv1_2 ,
138
+ maximum_ssl_version = ssl .TLSVersion . TLSv1_2 ,
139
139
)
140
140
141
141
You can’t perform that action at this time.
0 commit comments