docstr: Test that policy raises error if passed a box obs space.
docstr_tok: ["Test","that","policy","raises","error","if","passed","a","box","obs","space","."]
code: def test_invalid_action_spaces(self):
      """Test that policy raises error if passed a box obs space."""
      env = GymEnv(DummyDictEnv(act_space_type="box"))
      with pytest.raises(ValueError):
          CategoricalCNNPolicy(
              env_spec=env.spec,
              image_format="NHWC",
              kernel_sizes=(3,),
              hidden_channels=(3,),
          )
  
file_path: garage/tests/garage/torch/policies/test_categorical_cnn_policy.py
imports: import cloudpickle
  import pytest
  import torch
  from garage.envs import GymEnv
  from garage.torch.policies import CategoricalCNNPolicy
  from tests.fixtures.envs.dummy import DummyDictEnv, DummyDiscretePixelEnv
label_desc: Use image node_id 6 for calling the TestCategoricalCNNPolicy obj's underlying member method code with example usage: obj.test_invalid_action_spaces() without return types