Skip to content

Commit b6c1098

Browse files
authored
Test function renames, to match standards (#1679)
1 parent 3837e0d commit b6c1098

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

tests/test_timeseries.py

+20-20
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def client(modclient):
1111

1212

1313
@pytest.mark.redismod
14-
def testCreate(client):
14+
def test_create(client):
1515
assert client.ts().create(1)
1616
assert client.ts().create(2, retention_msecs=5)
1717
assert client.ts().create(3, labels={"Redis": "Labs"})
@@ -28,7 +28,7 @@ def testCreate(client):
2828

2929
@pytest.mark.redismod
3030
@skip_ifmodversion_lt("1.4.0", "timeseries")
31-
def testCreateDuplicatePolicy(client):
31+
def test_create_duplicate_policy(client):
3232
# Test for duplicate policy
3333
for duplicate_policy in ["block", "last", "first", "min", "max"]:
3434
ts_name = "time-serie-ooo-{0}".format(duplicate_policy)
@@ -38,7 +38,7 @@ def testCreateDuplicatePolicy(client):
3838

3939

4040
@pytest.mark.redismod
41-
def testAlter(client):
41+
def test_alter(client):
4242
assert client.ts().create(1)
4343
assert 0 == client.ts().info(1).retention_msecs
4444
assert client.ts().alter(1, retention_msecs=10)
@@ -51,7 +51,7 @@ def testAlter(client):
5151

5252
@pytest.mark.redismod
5353
@skip_ifmodversion_lt("1.4.0", "timeseries")
54-
def testAlterDiplicatePolicy(client):
54+
def test_alter_diplicate_policy(client):
5555
assert client.ts().create(1)
5656
info = client.ts().info(1)
5757
assert info.duplicate_policy is None
@@ -61,7 +61,7 @@ def testAlterDiplicatePolicy(client):
6161

6262

6363
@pytest.mark.redismod
64-
def testAdd(client):
64+
def test_add(client):
6565
assert 1 == client.ts().add(1, 1, 1)
6666
assert 2 == client.ts().add(2, 2, 3, retention_msecs=10)
6767
assert 3 == client.ts().add(3, 3, 2, labels={"Redis": "Labs"})
@@ -83,7 +83,7 @@ def testAdd(client):
8383

8484
@pytest.mark.redismod
8585
@skip_ifmodversion_lt("1.4.0", "timeseries")
86-
def testAddDuplicatePolicy(client):
86+
def test_add_duplicate_policy(client):
8787

8888
# Test for duplicate policy BLOCK
8989
assert 1 == client.ts().add("time-serie-add-ooo-block", 1, 5.0)
@@ -125,14 +125,14 @@ def testAddDuplicatePolicy(client):
125125

126126

127127
@pytest.mark.redismod
128-
def testMAdd(client):
128+
def test_madd(client):
129129
client.ts().create("a")
130130
assert [1, 2, 3] == \
131131
client.ts().madd([("a", 1, 5), ("a", 2, 10), ("a", 3, 15)])
132132

133133

134134
@pytest.mark.redismod
135-
def testIncrbyDecrby(client):
135+
def test_incrby_decrby(client):
136136
for _ in range(100):
137137
assert client.ts().incrby(1, 1)
138138
sleep(0.001)
@@ -161,7 +161,7 @@ def testIncrbyDecrby(client):
161161

162162

163163
@pytest.mark.redismod
164-
def testCreateAndDeleteRule(client):
164+
def test_create_and_delete_rule(client):
165165
# test rule creation
166166
time = 100
167167
client.ts().create(1)
@@ -183,7 +183,7 @@ def testCreateAndDeleteRule(client):
183183

184184
@pytest.mark.redismod
185185
@skip_ifmodversion_lt("99.99.99", "timeseries")
186-
def testDelRange(client):
186+
def test_del_range(client):
187187
try:
188188
client.ts().delete("test", 0, 100)
189189
except Exception as e:
@@ -197,7 +197,7 @@ def testDelRange(client):
197197

198198

199199
@pytest.mark.redismod
200-
def testRange(client):
200+
def test_range(client):
201201
for i in range(100):
202202
client.ts().add(1, i, i % 7)
203203
assert 100 == len(client.ts().range(1, 0, 200))
@@ -219,7 +219,7 @@ def testRange(client):
219219

220220
@pytest.mark.redismod
221221
@skip_ifmodversion_lt("99.99.99", "timeseries")
222-
def testRangeAdvanced(client):
222+
def test_range_advanced(client):
223223
for i in range(100):
224224
client.ts().add(1, i, i % 7)
225225
client.ts().add(1, i + 200, i % 7)
@@ -244,7 +244,7 @@ def testRangeAdvanced(client):
244244

245245
@pytest.mark.redismod
246246
@skip_ifmodversion_lt("99.99.99", "timeseries")
247-
def testRevRange(client):
247+
def test_rev_range(client):
248248
for i in range(100):
249249
client.ts().add(1, i, i % 7)
250250
assert 100 == len(client.ts().range(1, 0, 200))
@@ -318,7 +318,7 @@ def testMultiRange(client):
318318

319319
@pytest.mark.redismod
320320
@skip_ifmodversion_lt("99.99.99", "timeseries")
321-
def testMultiRangeAdvanced(client):
321+
def test_multi_range_advanced(client):
322322
client.ts().create(1, labels={"Test": "This", "team": "ny"})
323323
client.ts().create(
324324
2,
@@ -399,7 +399,7 @@ def testMultiRangeAdvanced(client):
399399

400400
@pytest.mark.redismod
401401
@skip_ifmodversion_lt("99.99.99", "timeseries")
402-
def testMultiReverseRange(client):
402+
def test_multi_reverse_range(client):
403403
client.ts().create(1, labels={"Test": "This", "team": "ny"})
404404
client.ts().create(
405405
2,
@@ -496,7 +496,7 @@ def testMultiReverseRange(client):
496496

497497

498498
@pytest.mark.redismod
499-
def testGet(client):
499+
def test_get(client):
500500
name = "test"
501501
client.ts().create(name)
502502
assert client.ts().get(name) is None
@@ -507,7 +507,7 @@ def testGet(client):
507507

508508

509509
@pytest.mark.redismod
510-
def testMGet(client):
510+
def test_mget(client):
511511
client.ts().create(1, labels={"Test": "This"})
512512
client.ts().create(2, labels={"Test": "This", "Taste": "That"})
513513
act_res = client.ts().mget(["Test=This"])
@@ -528,7 +528,7 @@ def testMGet(client):
528528

529529

530530
@pytest.mark.redismod
531-
def testInfo(client):
531+
def test_info(client):
532532
client.ts().create(
533533
1,
534534
retention_msecs=5,
@@ -556,7 +556,7 @@ def testInfoDuplicatePolicy(client):
556556

557557

558558
@pytest.mark.redismod
559-
def testQueryIndex(client):
559+
def test_query_index(client):
560560
client.ts().create(1, labels={"Test": "This"})
561561
client.ts().create(2, labels={"Test": "This", "Taste": "That"})
562562
assert 2 == len(client.ts().queryindex(["Test=This"]))
@@ -580,7 +580,7 @@ def test_pipeline(client):
580580

581581

582582
@pytest.mark.redismod
583-
def testUncompressed(client):
583+
def test_uncompressed(client):
584584
client.ts().create("compressed")
585585
client.ts().create("uncompressed", uncompressed=True)
586586
compressed_info = client.ts().info("compressed")

0 commit comments

Comments
 (0)