docstr: Test that policy raises error if passed a dict obs space.
docstr_tok: ["Test","that","policy","raises","error","if","passed","a","dict","obs","space","."]
code: def test_invalid_action_spaces(self):
      """Test that policy raises error if passed a dict obs space."""
      env = GymEnv(DummyDictEnv(act_space_type="box"))
      with pytest.raises(ValueError):
          qf = SimpleQFunction(env.spec)
          DiscreteQFArgmaxPolicy(env_spec=env.spec, qf=qf)
  
imports: import pickle
  import pytest
  import tensorflow
  from garage.envs import GymEnv
  from garage.envs.wrappers import AtariEnv
  from garage.tf.policies import DiscreteQFArgmaxPolicy
  from garage.tf.q_functions import DiscreteCNNQFunction
  from tests.fixtures import TfGraphTestCase
  from tests.fixtures.envs.dummy import DummyDictEnv, DummyDiscreteEnv, DummyDiscretePixelEnvBaselines
  from tests.fixtures.q_functions import SimpleQFunction
label_desc: Use image node_id 6 for calling the TestQfDerivedPolicy obj's underlying member method code with example usage: obj.test_invalid_action_spaces() without return types