tests: Improve test further
This commit is contained in:
@@ -613,12 +613,14 @@ def test_start_new_strategy(caplog, user_dir):
|
|||||||
"--strategy",
|
"--strategy",
|
||||||
"CoolNewStrategy",
|
"CoolNewStrategy",
|
||||||
"--strategy-path",
|
"--strategy-path",
|
||||||
str(user_dir / "nonexistant"),
|
str(user_dir / "nonexistent"),
|
||||||
]
|
]
|
||||||
start_new_strategy(get_args(args))
|
start_new_strategy(get_args(args))
|
||||||
assert (user_dir / "CoolNewStrategy.py").exists()
|
assert (user_dir / "CoolNewStrategy.py").exists()
|
||||||
|
|
||||||
assert log_has_re("Creating strategy directory .*", caplog)
|
assert log_has_re("Creating strategy directory .*", caplog)
|
||||||
|
assert (user_dir / "nonexistent").is_dir()
|
||||||
|
assert (user_dir / "nonexistent" / "CoolNewStrategy.py").exists()
|
||||||
|
|
||||||
shutil.rmtree(str(user_dir))
|
shutil.rmtree(str(user_dir))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user