Try fix random testfailure
This commit is contained in:
parent
0528af1700
commit
9336d8ee02
@ -447,11 +447,9 @@ def test_create_datadir_failed(caplog):
|
|||||||
|
|
||||||
|
|
||||||
def test_create_datadir(caplog, mocker):
|
def test_create_datadir(caplog, mocker):
|
||||||
# Ensure that caplog is empty before starting ...
|
|
||||||
# Should prevent random failures.
|
# Capture caplog length here trying to avoid random test failure
|
||||||
caplog.clear()
|
len_caplog_before = len(caplog.record_tuples)
|
||||||
# Added assert here to analyze random test-failures ...
|
|
||||||
assert len(caplog.record_tuples) == 0
|
|
||||||
|
|
||||||
cud = mocker.patch("freqtrade.commands.deploy_commands.create_userdata_dir", MagicMock())
|
cud = mocker.patch("freqtrade.commands.deploy_commands.create_userdata_dir", MagicMock())
|
||||||
csf = mocker.patch("freqtrade.commands.deploy_commands.copy_sample_files", MagicMock())
|
csf = mocker.patch("freqtrade.commands.deploy_commands.copy_sample_files", MagicMock())
|
||||||
@ -464,7 +462,7 @@ def test_create_datadir(caplog, mocker):
|
|||||||
|
|
||||||
assert cud.call_count == 1
|
assert cud.call_count == 1
|
||||||
assert csf.call_count == 1
|
assert csf.call_count == 1
|
||||||
assert len(caplog.record_tuples) == 0
|
assert len(caplog.record_tuples) == len_caplog_before
|
||||||
|
|
||||||
|
|
||||||
def test_start_new_strategy(mocker, caplog):
|
def test_start_new_strategy(mocker, caplog):
|
||||||
|
Loading…
Reference in New Issue
Block a user