docstr: Tests adding initial observations and infos.
  
  This test ensures that when initial observation and info are provided
  the length of the lists are correct and the timestep is still at zero,
  as the agent has not stepped, yet.
docstr_tok: ["Tests","adding","initial","observations","and","infos",".","This","test","ensures","that","when","initial","observation","and","info","are","provided","the","length","of","the","lists","are","correct","and","the","timestep","is","still","at","zero",",","as","the","agent","has","not","stepped",",","yet","."]
code: def test_add_env_reset(self):
      """Tests adding initial observations and infos.
  
      This test ensures that when initial observation and info are provided
      the length of the lists are correct and the timestep is still at zero,
      as the agent has not stepped, yet.
      """
      # Create empty episode.
      episode = SingleAgentEpisode()
      # Create environment.
      env = gym.make("CartPole-v1")
  
      # Add initial observations.
      obs, info = env.reset()
      episode.add_env_reset(observation=obs, infos=info)
  
      # Assert that the observations are added to their list.
      self.assertTrue(len(episode.observations) == 1)
      # Assert that the infos are added to their list.
      self.assertTrue(len(episode.infos) == 1)
      # Assert that the timesteps are still at zero as we have not stepped, yet.
      self.assertTrue(episode.t == episode.t_started == 0)
  
imports: from collections import defaultdict
  from typing import Any, Dict, Optional, SupportsFloat, Tuple
  import unittest
  import gymnasium
  from gymnasium.core import ActType, ObsType
  import numpy
  from ray.rllib.env.single_agent_episode import SingleAgentEpisode
  from ray.rllib.utils.test_utils import check
label_desc: Use image node_id 2 for calling the TestSingelAgentEpisode obj's underlying member method code with example usage: obj.test_add_env_reset() without return types