-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |