Skip to content

Commit

Permalink
tests: move e2e test_blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
zyzniewski-reef committed Feb 25, 2025
1 parent 31aa6b3 commit 5fb5825
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
22 changes: 0 additions & 22 deletions tests/e2e_tests/test_blocks.py

This file was deleted.

22 changes: 22 additions & 0 deletions tests/e2e_tests/test_metagraph.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os.path
import re
import shutil
import time

Expand Down Expand Up @@ -405,3 +406,24 @@ def test_metagraph_info(subtensor, alice_wallet):
metagraph_info = subtensor.get_metagraph_info(netuid=3)

assert metagraph_info is None


def test_blocks(subtensor):
"""
Tests:
- Get current block
- Get block hash
- Wait for block
"""

block = subtensor.get_current_block()

assert block == subtensor.block

block_hash = subtensor.get_block_hash(block)

assert re.match("0x[a-z0-9]{64}", block_hash)

subtensor.wait_for_block(block + 10)

assert subtensor.get_current_block() == block + 10

0 comments on commit 5fb5825

Please sign in to comment.