use "usefixtures" to prevent pylint "unused parameter" message
This commit is contained in:
parent
b326eec77e
commit
734d39d002
@ -95,7 +95,8 @@ def test_init_prod_db(default_conf, mocker):
|
|||||||
os.rename(prod_db_swp, prod_db)
|
os.rename(prod_db_swp, prod_db)
|
||||||
|
|
||||||
|
|
||||||
def test_update_with_bittrex(init_persistence, limit_buy_order, limit_sell_order):
|
@pytest.mark.usefixtures("init_persistence")
|
||||||
|
def test_update_with_bittrex(limit_buy_order, limit_sell_order):
|
||||||
"""
|
"""
|
||||||
On this test we will buy and sell a crypto currency.
|
On this test we will buy and sell a crypto currency.
|
||||||
|
|
||||||
@ -149,7 +150,8 @@ def test_update_with_bittrex(init_persistence, limit_buy_order, limit_sell_order
|
|||||||
assert trade.close_date is not None
|
assert trade.close_date is not None
|
||||||
|
|
||||||
|
|
||||||
def test_calc_open_close_trade_price(init_persistence, limit_buy_order, limit_sell_order):
|
@pytest.mark.usefixtures("init_persistence")
|
||||||
|
def test_calc_open_close_trade_price(limit_buy_order, limit_sell_order):
|
||||||
trade = Trade(
|
trade = Trade(
|
||||||
pair='BTC_ETH',
|
pair='BTC_ETH',
|
||||||
stake_amount=0.001,
|
stake_amount=0.001,
|
||||||
@ -171,7 +173,8 @@ def test_calc_open_close_trade_price(init_persistence, limit_buy_order, limit_se
|
|||||||
assert trade.calc_profit_percent() == 0.06201057
|
assert trade.calc_profit_percent() == 0.06201057
|
||||||
|
|
||||||
|
|
||||||
def test_calc_close_trade_price_exception(init_persistence, limit_buy_order):
|
@pytest.mark.usefixtures("init_persistence")
|
||||||
|
def test_calc_close_trade_price_exception(limit_buy_order):
|
||||||
trade = Trade(
|
trade = Trade(
|
||||||
pair='BTC_ETH',
|
pair='BTC_ETH',
|
||||||
stake_amount=0.001,
|
stake_amount=0.001,
|
||||||
@ -184,7 +187,8 @@ def test_calc_close_trade_price_exception(init_persistence, limit_buy_order):
|
|||||||
assert trade.calc_close_trade_price() == 0.0
|
assert trade.calc_close_trade_price() == 0.0
|
||||||
|
|
||||||
|
|
||||||
def test_update_open_order(init_persistence, limit_buy_order):
|
@pytest.mark.usefixtures("init_persistence")
|
||||||
|
def test_update_open_order(limit_buy_order):
|
||||||
trade = Trade(
|
trade = Trade(
|
||||||
pair='BTC_ETH',
|
pair='BTC_ETH',
|
||||||
stake_amount=1.00,
|
stake_amount=1.00,
|
||||||
@ -206,7 +210,8 @@ def test_update_open_order(init_persistence, limit_buy_order):
|
|||||||
assert trade.close_date is None
|
assert trade.close_date is None
|
||||||
|
|
||||||
|
|
||||||
def test_update_invalid_order(init_persistence, limit_buy_order):
|
@pytest.mark.usefixtures("init_persistence")
|
||||||
|
def test_update_invalid_order(limit_buy_order):
|
||||||
trade = Trade(
|
trade = Trade(
|
||||||
pair='BTC_ETH',
|
pair='BTC_ETH',
|
||||||
stake_amount=1.00,
|
stake_amount=1.00,
|
||||||
@ -218,7 +223,8 @@ def test_update_invalid_order(init_persistence, limit_buy_order):
|
|||||||
trade.update(limit_buy_order)
|
trade.update(limit_buy_order)
|
||||||
|
|
||||||
|
|
||||||
def test_calc_open_trade_price(init_persistence, limit_buy_order):
|
@pytest.mark.usefixtures("init_persistence")
|
||||||
|
def test_calc_open_trade_price(limit_buy_order):
|
||||||
trade = Trade(
|
trade = Trade(
|
||||||
pair='BTC_ETH',
|
pair='BTC_ETH',
|
||||||
stake_amount=0.001,
|
stake_amount=0.001,
|
||||||
@ -235,7 +241,8 @@ def test_calc_open_trade_price(init_persistence, limit_buy_order):
|
|||||||
assert trade.calc_open_trade_price(fee=0.003) == 0.001003000
|
assert trade.calc_open_trade_price(fee=0.003) == 0.001003000
|
||||||
|
|
||||||
|
|
||||||
def test_calc_close_trade_price(init_persistence, limit_buy_order, limit_sell_order):
|
@pytest.mark.usefixtures("init_persistence")
|
||||||
|
def test_calc_close_trade_price(limit_buy_order, limit_sell_order):
|
||||||
trade = Trade(
|
trade = Trade(
|
||||||
pair='BTC_ETH',
|
pair='BTC_ETH',
|
||||||
stake_amount=0.001,
|
stake_amount=0.001,
|
||||||
@ -256,7 +263,8 @@ def test_calc_close_trade_price(init_persistence, limit_buy_order, limit_sell_or
|
|||||||
assert trade.calc_close_trade_price(fee=0.005) == 0.0010619972
|
assert trade.calc_close_trade_price(fee=0.005) == 0.0010619972
|
||||||
|
|
||||||
|
|
||||||
def test_calc_profit(init_persistence, limit_buy_order, limit_sell_order):
|
@pytest.mark.usefixtures("init_persistence")
|
||||||
|
def test_calc_profit(limit_buy_order, limit_sell_order):
|
||||||
trade = Trade(
|
trade = Trade(
|
||||||
pair='BTC_ETH',
|
pair='BTC_ETH',
|
||||||
stake_amount=0.001,
|
stake_amount=0.001,
|
||||||
@ -286,7 +294,8 @@ def test_calc_profit(init_persistence, limit_buy_order, limit_sell_order):
|
|||||||
assert trade.calc_profit(fee=0.003) == 0.00006163
|
assert trade.calc_profit(fee=0.003) == 0.00006163
|
||||||
|
|
||||||
|
|
||||||
def test_calc_profit_percent(init_persistence, limit_buy_order, limit_sell_order):
|
@pytest.mark.usefixtures("init_persistence")
|
||||||
|
def test_calc_profit_percent(limit_buy_order, limit_sell_order):
|
||||||
trade = Trade(
|
trade = Trade(
|
||||||
pair='BTC_ETH',
|
pair='BTC_ETH',
|
||||||
stake_amount=0.001,
|
stake_amount=0.001,
|
||||||
|
Loading…
Reference in New Issue
Block a user