Skip to content

Commit b34a61b

Browse files
Merge branch 'staging' into tests/zyzniewski/proper_mock
2 parents 4911c77 + a888521 commit b34a61b

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

tests/e2e_tests/test_incentive.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import asyncio
2-
import time
32

43
import pytest
54

@@ -23,9 +22,6 @@ async def test_incentive(local_chain, subtensor, templates, alice_wallet, bob_wa
2322
AssertionError: If any of the checks or verifications fail
2423
"""
2524

26-
# Wait for 2 tempos to spin up chain properly
27-
subtensor.wait_for_block(20)
28-
2925
print("Testing test_incentive")
3026
netuid = 2
3127

@@ -51,15 +47,13 @@ async def test_incentive(local_chain, subtensor, templates, alice_wallet, bob_wa
5147
# Get current miner/validator stats
5248
alice_neuron = metagraph.neurons[0]
5349

54-
time.sleep(30)
5550
assert alice_neuron.validator_permit is True
5651
assert alice_neuron.dividends == 0
5752
assert alice_neuron.stake.tao > 0
5853
assert alice_neuron.validator_trust == 0
5954

6055
bob_neuron = metagraph.neurons[1]
6156

62-
time.sleep(30)
6357
assert bob_neuron.incentive == 0
6458
assert bob_neuron.consensus == 0
6559
assert bob_neuron.rank == 0
@@ -79,15 +73,14 @@ async def test_incentive(local_chain, subtensor, templates, alice_wallet, bob_wa
7973
# wait for the Validator to process and set_weights
8074
await asyncio.sleep(5)
8175

82-
# Wait until next epoch
83-
await wait_epoch(subtensor, netuid)
76+
# Wait few epochs
77+
await wait_epoch(subtensor, netuid, times=4)
8478

8579
# Refresh metagraph
8680
metagraph = subtensor.metagraph(netuid)
8781

8882
# Get current emissions and validate that Alice has gotten tao
8983
alice_neuron = metagraph.neurons[0]
90-
time.sleep(5)
9184

9285
assert alice_neuron.validator_permit is True
9386
assert alice_neuron.dividends == 1.0

0 commit comments

Comments
 (0)