mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-09-04 11:16:54 +00:00
16 lines
353 B
Python
16 lines
353 B
Python
![]() |
from gym import core
|
||
|
|
||
|
class ArgumentEnv(core.Env):
|
||
|
calls = 0
|
||
|
|
||
|
def __init__(self, arg):
|
||
|
self.calls += 1
|
||
|
self.arg = arg
|
||
|
|
||
|
def test_env_instantiation():
|
||
|
# This looks like a pretty trivial, but given our usage of
|
||
|
# __new__, it's worth having.
|
||
|
env = ArgumentEnv('arg')
|
||
|
assert env.arg == 'arg'
|
||
|
assert env.calls == 1
|