@@ -297,13 +297,33 @@ def test_eth_getBlockTransactionCountByNumber_block_with_txn_deprecated(
297297 assert transaction_count >= 1
298298
299299 def test_eth_getUncleCountByBlockHash (self , web3 : "Web3" , empty_block : BlockData ) -> None :
300- uncle_count = web3 .eth .getUncleCount (empty_block ['hash' ])
300+ uncle_count = web3 .eth .get_uncle_count (empty_block ['hash' ])
301+
302+ assert is_integer (uncle_count )
303+ assert uncle_count == 0
304+
305+ def test_eth_getUncleCountByBlockHash_deprecated (self ,
306+ web3 : "Web3" ,
307+ empty_block : BlockData ) -> None :
308+ with pytest .warns (DeprecationWarning ,
309+ match = 'getUncleCount is deprecated in favor of get_uncle_count' ):
310+ uncle_count = web3 .eth .getUncleCount (empty_block ['hash' ])
301311
302312 assert is_integer (uncle_count )
303313 assert uncle_count == 0
304314
305315 def test_eth_getUncleCountByBlockNumber (self , web3 : "Web3" , empty_block : BlockData ) -> None :
306- uncle_count = web3 .eth .getUncleCount (empty_block ['number' ])
316+ uncle_count = web3 .eth .get_uncle_count (empty_block ['number' ])
317+
318+ assert is_integer (uncle_count )
319+ assert uncle_count == 0
320+
321+ def test_eth_getUncleCountByBlockNumber_deprecated (self ,
322+ web3 : "Web3" ,
323+ empty_block : BlockData ) -> None :
324+ with pytest .warns (DeprecationWarning ,
325+ match = 'getUncleCount is deprecated in favor of get_uncle_count' ):
326+ uncle_count = web3 .eth .getUncleCount (empty_block ['number' ])
307327
308328 assert is_integer (uncle_count )
309329 assert uncle_count == 0
0 commit comments