def test_run_trade_wexpire(pair, start, type, SL, TP, entry, entered): ''' This test checks the run_trade method with the 'expires' parameter ''' td = Trade(start=start, entry=entry, SL=SL, TP=TP, pair=pair, type=type, timeframe="D", strat="counter_b2", id="test", settingf="../../data/settings.ini") td.run_trade(expires=2) assert td.entered == entered
def test_run_trade_4hrs(pair, start, type, SL, TP, entry, outcome): ''' This test checks the run_trade method with the 'expires' parameter ''' td = Trade(start=start, entry=entry, SL=SL, TP=TP, pair=pair, type=type, timeframe="H4", strat="counter_b2", id="test", settingf="../../data/settings.ini") td.run_trade() assert td.outcome == outcome
def test_run_trade(pair, start, type, SL, TP, entry, outcome): ''' This test checks the progression of the Trade and checks if the outcome attribute is correctly defined. ''' td = Trade(start=start, entry=entry, SL=SL, TP=TP, pair=pair, type=type, timeframe="D", strat="counter_b2", id="test", settingf="../../data/settings.ini") td.run_trade() assert td.outcome == outcome