Tianshou/test/pettingzoo/test_pistonball_continuous.py
Michael Panchenko 12d4262f80 Tests: removed all instances of if __name__ == ... in tests
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
2024-04-26 17:39:30 +02:00

15 lines
374 B
Python

import argparse
import pytest
from pistonball_continuous import get_args, train_agent, watch
@pytest.mark.skip(reason="runtime too long and unstable result")
def test_piston_ball_continuous(args: argparse.Namespace = get_args()) -> None:
if args.watch:
watch(args)
return
result, agent = train_agent(args)
# assert result.best_reward >= 30.0