'Why does using pytest.skip() give me different results when I copy freeCodeCamp's code?

def test_get_entrance_fee():
    if network.show_active() not in LOCAL_BLOCKCHAIN_ENVIRONMENTS:
        pytest.skip()
    # Arrange
    lottery = deploy_lottery()
    # Act
    # 2,000 eth / usd
    # usdEntryFee is 50
    # 2000/1 == 50/x == 0.025
    expected_entrance_fee = Web3.toWei(0.025, "ether")
    entrance_fee = lottery.getEntranceFee()
    # Assert
    assert expected_entrance_fee == entrance_fee

Excuting an order

brownie test -k test_get_entrance_fee --network rinkeby

the result should be like enter image description here

but I got below enter image description here



Solution 1:[1]

You should add WEB3_INFURA_PROJECT_ID to .env file

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Khanh D Tr?n