A test is not a script and should not be used as such Also marked pistonball test as skipped since it doesn't actually test anything
13 lines
293 B
Python
13 lines
293 B
Python
import argparse
|
|
|
|
from tic_tac_toe import get_args, train_agent, watch
|
|
|
|
|
|
def test_tic_tac_toe(args: argparse.Namespace = get_args()) -> None:
|
|
if args.watch:
|
|
watch(args)
|
|
return
|
|
|
|
result, agent = train_agent(args)
|
|
assert result.best_reward >= args.win_rate
|