blob: 71c01798f40847b8c323f5e0fb870087adbefaae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import unittest
from tests.server_commands import ServerCommandsTestCase
from tests.connection_pool import ConnectionPoolTestCase
from tests.connection_pool import BlockingConnectionPoolTestCase
from tests.pipeline import PipelineTestCase
from tests.lock import LockTestCase
from tests.pubsub import PubSubTestCase, PubSubRedisDownTestCase
from tests.encoding import (PythonParserEncodingTestCase,
HiredisEncodingTestCase)
try:
import hiredis
use_hiredis = True
except ImportError:
use_hiredis = False
def all_tests():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(ServerCommandsTestCase))
suite.addTest(unittest.makeSuite(ConnectionPoolTestCase))
suite.addTest(unittest.makeSuite(BlockingConnectionPoolTestCase))
suite.addTest(unittest.makeSuite(PipelineTestCase))
suite.addTest(unittest.makeSuite(LockTestCase))
suite.addTest(unittest.makeSuite(PubSubTestCase))
suite.addTest(unittest.makeSuite(PubSubRedisDownTestCase))
suite.addTest(unittest.makeSuite(PythonParserEncodingTestCase))
if use_hiredis:
suite.addTest(unittest.makeSuite(HiredisEncodingTestCase))
return suite
|