Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved pytest.xfail to pytest.mark.xfail #1376

Merged
merged 2 commits into from
Jul 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions tests/integration/go_ethereum/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,46 +16,44 @@ def _check_web3_clientVersion(self, client_version):


class GoEthereumEthModuleTest(EthModuleTest):
@pytest.mark.xfail(reason='Needs ability to efficiently control mining')
def test_eth_replaceTransaction(self, web3, unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction(web3, unlocked_account)

def test_eth_replaceTransaction_incorrect_nonce(self, web3, unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction_incorrect_nonce(web3, unlocked_account)

def test_eth_replaceTransaction_gas_price_too_low(self, web3, unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction_gas_price_too_low(web3, unlocked_account)

@pytest.mark.xfail(reason='Needs ability to efficiently control mining')
def test_eth_replaceTransaction_gas_price_defaulting_minimum(self, web3, unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction_gas_price_defaulting_minimum(web3, unlocked_account)

@pytest.mark.xfail(reason='Needs ability to efficiently control mining')
def test_eth_replaceTransaction_gas_price_defaulting_strategy_higher(self,
web3,
unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction_gas_price_defaulting_strategy_higher(
web3, unlocked_account
)

@pytest.mark.xfail(reason='Needs ability to efficiently control mining')
def test_eth_replaceTransaction_gas_price_defaulting_strategy_lower(self,
web3,
unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction_gas_price_defaulting_strategy_lower(
web3, unlocked_account
)

@pytest.mark.xfail(reason='Needs ability to efficiently control mining')
def test_eth_modifyTransaction(self, web3, unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_modifyTransaction(web3, unlocked_account)

@pytest.mark.xfail(reason='Block identifier has not been implemented in geth')
def test_eth_estimateGas_with_block(self,
web3,
unlocked_account_dual_type):
pytest.xfail('Block identifier has not been implemented in geth')
super().test_eth_estimateGas_with_block(
web3, unlocked_account_dual_type
)
Expand Down
14 changes: 4 additions & 10 deletions tests/integration/parity/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,52 +32,46 @@ def test_eth_chainId(self, web3):
chain_id = web3.eth.chainId
assert chain_id is None

@pytest.mark.xfail(reason='Parity dropped "pending" option in 1.11.1')
def test_eth_getBlockByNumber_pending(self, web3):
pytest.xfail('Parity dropped "pending" option in 1.11.1')
super().test_eth_getBlockByNumber_pending(web3)

def test_eth_uninstallFilter(self, web3):
pytest.xfail('eth_uninstallFilter calls to parity always return true')
super().test_eth_uninstallFilter(web3)

def test_eth_replaceTransaction(self, web3, unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction(web3, unlocked_account)

@pytest.mark.xfail(reason='Parity is not setup to auto mine')
def test_eth_replaceTransaction_already_mined(self, web3, unlocked_account):
pytest.xfail('Parity is not setup to auto mine')
super().test_eth_replaceTransaction_already_mined(web3, unlocked_account)

def test_eth_replaceTransaction_incorrect_nonce(self, web3, unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction_incorrect_nonce(web3, unlocked_account)

def test_eth_replaceTransaction_gas_price_too_low(self, web3, unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction_gas_price_too_low(web3, unlocked_account)

def test_eth_replaceTransaction_gas_price_defaulting_minimum(self, web3, unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction_gas_price_defaulting_minimum(web3, unlocked_account)

def test_eth_replaceTransaction_gas_price_defaulting_strategy_higher(self,
web3,
unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction_gas_price_defaulting_strategy_higher(
web3, unlocked_account
)

def test_eth_replaceTransaction_gas_price_defaulting_strategy_lower(self,
web3,
unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction_gas_price_defaulting_strategy_lower(
web3, unlocked_account
)

@pytest.mark.xfail(reason='Needs ability to efficiently control mining')
def test_eth_modifyTransaction(self, web3, unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_modifyTransaction(web3, unlocked_account)

@flaky(max_runs=MAX_FLAKY_RUNS)
Expand All @@ -95,8 +89,8 @@ def test_eth_getTransactionReceipt_unmined(self, web3, unlocked_account):
assert receipt is not None
assert receipt['blockHash'] is None

@pytest.mark.xfail(reason="Parity matches None to asbent values")
def test_eth_getLogs_with_logs_none_topic_args(self, web3):
pytest.xfail("Parity matches None to asbent values")
super().test_eth_getLogs_with_logs_none_topic_args(web3)

@flaky(max_runs=MAX_FLAKY_RUNS)
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_ethereum_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,14 @@ def test_eth_call_old_contract_state(self, eth_tester, web3, math_contract, unlo
else:
raise AssertionError("eth-tester was unexpectedly able to give the pending call result")

@pytest.mark.xfail(reason='json-rpc method is not implemented on eth-tester')
def test_eth_getStorageAt(self, web3, emitter_contract_address):
pytest.xfail('json-rpc method is not implemented on eth-tester')
super().test_eth_getStorageAt(web3, emitter_contract_address)

@pytest.mark.xfail(reason='Block identifier has not been implemented in eth-tester')
def test_eth_estimateGas_with_block(self,
web3,
unlocked_account_dual_type):
pytest.xfail('Block identifier has not been implemented in eth-tester')
super().test_eth_estimateGas_with_block(
web3, unlocked_account_dual_type
)
Expand Down
2 changes: 1 addition & 1 deletion web3/_utils/module_testing/eth_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def test_eth_sendTransaction_with_nonce(self, web3, unlocked_account):
'value': 1,
'gas': 21000,
# Increased gas price to ensure transaction hash different from other tests
'gasPrice': web3.eth.gasPrice * 2,
'gasPrice': web3.eth.gasPrice * 3,
'nonce': web3.eth.getTransactionCount(unlocked_account),
}
txn_hash = web3.eth.sendTransaction(txn_params)
Expand Down
4 changes: 2 additions & 2 deletions web3/_utils/module_testing/personal_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ def test_personal_newAccount(self, web3):
new_account = web3.parity.personal.newAccount(PASSWORD)
assert is_checksum_address(new_account)

@pytest.mark.xfail(reason='this non-standard json-rpc method is not implemented on parity')
def test_personal_lockAccount(self, web3, unlocked_account):
pytest.xfail('this non-standard json-rpc method is not implemented on parity')
super().test_personal_lockAccount(web3, unlocked_account)

@pytest.mark.xfail(reason='this non-standard json-rpc method is not implemented on parity')
def test_personal_importRawKey(self, web3):
pytest.xfail('this non-standard json-rpc method is not implemented on parity')
super().test_personal_importRawKey(web3)

def test_personal_sendTransaction(self,
Expand Down