class_docstr: Unit tests for policy gradient.
class_docstr_tok: ["Unit","tests","for","policy","gradient","."]
code: def test_init(self, mock_model):
      mock_model.side_effect = self._setup_test_model
  
      action_space = spaces.Discrete(2)
      observation_space = spaces.Box(0, 1, (1,))
      sut = ActorCritic("", observation_space, action_space)
  
      self.assertEqual(sut._num_actions, 2)
      self.assertIsNone(sut._num_states)
      self.assertEqual(sut._shape_of_inputs, (1,))
      self.assertFalse(sut._discrete_observation_space)
      self.assertIsNone(sut._space_discretizer)
      self.assertIsNone(sut._preprocessor)
      self.assertEqual(mock_model.call_count, 2)
      mock_model.assert_has_calls(
          [
              mock.call(
                  (1,),
                  2,
                  "[10]",
                  cross_entropy_with_softmax,
                  use_placeholder_for_input=True,
              ),
              mock.call(
                  (1,), 1, "[10]", use_placeholder_for_input=True
              ),
          ],
          any_order=True,
      )
  
imports: import unittest
  import cntk.contrib.deeprl.tests.spaces
  import numpy
  from cntk.contrib.deeprl.agent.policy_gradient import ActorCritic
  from cntk.layers import Dense
  from cntk.losses import cross_entropy_with_softmax
  from cntk.ops import input_variable, placeholder
label_desc: Use image node_id 1 for calling the PolicyGradientTest obj's underlying member method code with example usage: obj.test_init(mock_model) without return types