Skip to content

Commit ee85941

Browse files
committed
pep8 code
1 parent fa3e17a commit ee85941

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

tests/conftest.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,14 @@ def mock_cluster_resp_nodes(request, **kwargs):
100100
'master - 0 1447836263562 3 connected 10923-16383\n'
101101
'fbb23ed8cfa23f17eaf27ff7d0c410492a1093d6 172.17.0.7:7002 '
102102
'master,fail - 1447829446956 1447829444948 1 disconnected\n'
103-
)
103+
)
104104
return _gen_cluster_mock_resp(r, response)
105105

106106

107107
@pytest.fixture()
108108
def mock_cluster_resp_slaves(request, **kwargs):
109109
r = _get_client(redis.Redis, request, **kwargs)
110-
response = "['1df047e5a594f945d82fc140be97a1452bcbf93e 172.17.0.7:7007 slave 19efe5a631f3296fdf21a5441680f893e8cc96ec 0 1447836789290 3 connected']"
110+
response = ("['1df047e5a594f945d82fc140be97a1452bcbf93e 172.17.0.7:7007 "
111+
"slave 19efe5a631f3296fdf21a5441680f893e8cc96ec 0 "
112+
"1447836789290 3 connected']")
111113
return _gen_cluster_mock_resp(r, response)

tests/test_commands.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ def test_sort_groups_three_gets(self, r):
12951295
(b('u1'), b('d1'), b('1')),
12961296
(b('u2'), b('d2'), b('2')),
12971297
(b('u3'), b('d3'), b('3'))
1298-
]
1298+
]
12991299

13001300
def test_sort_desc(self, r):
13011301
r.rpush('a', '2', '3', '1')
@@ -1339,7 +1339,7 @@ def test_sort_all_options(self, r):
13391339
[b('vodka'), b('milk'), b('gin'), b('apple juice')]
13401340

13411341
def test_cluster_addslots(self, mock_cluster_resp_ok):
1342-
assert mock_cluster_resp_ok.cluster('ADDSLOTS', 1) == True
1342+
assert mock_cluster_resp_ok.cluster('ADDSLOTS', 1) is True
13431343

13441344
def test_cluster_count_failure_reports(self, mock_cluster_resp_int):
13451345
assert isinstance(mock_cluster_resp_int.cluster(
@@ -1350,13 +1350,13 @@ def test_cluster_countkeysinslot(self, mock_cluster_resp_int):
13501350
'COUNTKEYSINSLOT', 2), int)
13511351

13521352
def test_cluster_delslots(self, mock_cluster_resp_ok):
1353-
assert mock_cluster_resp_ok.cluster('DELSLOTS', 1) == True
1353+
assert mock_cluster_resp_ok.cluster('DELSLOTS', 1) is True
13541354

13551355
def test_cluster_failover(self, mock_cluster_resp_ok):
1356-
assert mock_cluster_resp_ok.cluster('FAILOVER', 1) == True
1356+
assert mock_cluster_resp_ok.cluster('FAILOVER', 1) is True
13571357

13581358
def test_cluster_forget(self, mock_cluster_resp_ok):
1359-
assert mock_cluster_resp_ok.cluster('FORGET', 1) == True
1359+
assert mock_cluster_resp_ok.cluster('FORGET', 1) is True
13601360

13611361
def test_cluster_info(self, mock_cluster_resp_info):
13621362
assert isinstance(mock_cluster_resp_info.cluster('info'), dict)
@@ -1366,23 +1366,23 @@ def test_cluster_keyslot(self, mock_cluster_resp_int):
13661366
'keyslot', 'asdf'), int)
13671367

13681368
def test_cluster_meet(self, mock_cluster_resp_ok):
1369-
assert mock_cluster_resp_ok.cluster('meet', 'ip', 'port', 1) == True
1369+
assert mock_cluster_resp_ok.cluster('meet', 'ip', 'port', 1) is True
13701370

13711371
def test_cluster_nodes(self, mock_cluster_resp_nodes):
13721372
assert isinstance(mock_cluster_resp_nodes.cluster('nodes'), dict)
13731373

13741374
def test_cluster_replicate(self, mock_cluster_resp_ok):
1375-
assert mock_cluster_resp_ok.cluster('replicate', 'nodeid') == True
1375+
assert mock_cluster_resp_ok.cluster('replicate', 'nodeid') is True
13761376

13771377
def test_cluster_reset(self, mock_cluster_resp_ok):
1378-
assert mock_cluster_resp_ok.cluster('reset', 'hard') == True
1378+
assert mock_cluster_resp_ok.cluster('reset', 'hard') is True
13791379

13801380
def test_cluster_saveconfig(self, mock_cluster_resp_ok):
1381-
assert mock_cluster_resp_ok.cluster('saveconfig') == True
1381+
assert mock_cluster_resp_ok.cluster('saveconfig') is True
13821382

13831383
def test_cluster_setslot(self, mock_cluster_resp_ok):
13841384
assert mock_cluster_resp_ok.cluster('setslot', 1,
1385-
'IMPORTING', 'nodeid') == True
1385+
'IMPORTING', 'nodeid') is True
13861386

13871387
def test_cluster_slaves(self, mock_cluster_resp_slaves):
13881388
assert isinstance(mock_cluster_resp_slaves.cluster(
@@ -1425,6 +1425,7 @@ def test_strict_pttl(self, sr):
14251425

14261426

14271427
class TestBinarySave(object):
1428+
14281429
def test_binary_get_set(self, r):
14291430
assert r.set(' foo bar ', '123')
14301431
assert r.get(' foo bar ') == b('123')

0 commit comments

Comments
 (0)