Skip to content

Commit

Permalink
Add test for PettingZoo API
Browse files Browse the repository at this point in the history
  • Loading branch information
rchaput committed Jul 18, 2024
1 parent c55d1e8 commit 16070b2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_pettingzoo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
Test that our custom environment works according to the PettingZoo Parallel API.
"""


import unittest
from pettingzoo.test import parallel_api_test

from smartgrid import make_basic_smartgrid


class TestPettingZoo(unittest.TestCase):

def test_parallel_api(self):
env = make_basic_smartgrid(max_step=10_000)
parallel_api_test(env, num_cycles=1_000)


if __name__ == '__main__':
unittest.main()

0 comments on commit 16070b2

Please sign in to comment.