class_docstr: Tests that run through a game, then verify it still works in a replay.
docstr: A decorator to replace unittest.setUp so it can take args.
docstr_tok: ["A","decorator","to","replace","unittest.setUp","so","it","can","take","args","."]
code: def setup(**kwargs):
      """A decorator to replace unittest.setUp so it can take args."""
  
      def decorator(func):  # pylint: disable=missing-docstring
          @functools.wraps(func)
          def _setup(self):  # pylint: disable=missing-docstring
              def test_in_game():
                  print(
                      (" %s: Starting game " % func.__name__).center(
                          80, "-"
                      )
                  )
                  self.start_game(**kwargs)
                  func(self)
  
              def test_in_replay():
                  self.start_replay()
                  print(
                      (" %s: Starting replay " % func.__name__).center(
                          80, "-"
                      )
                  )
                  func(self)
  
              try:
                  test_in_game()
                  test_in_replay()
              finally:
                  self.close()
  
          return _setup
  
      return decorator
  
imports: import functools
  from absl import logging
  from absl.testing import absltest
  from pysc2 import maps
  from pysc2 import run_configs
  from pysc2.lib import actions
  from pysc2.lib import features
  from pysc2.lib import point
  from pysc2.lib import portspicker
  from pysc2.lib import run_parallel
  from pysc2.lib import stopwatch
  from s2clientprotocol import common_pb2
  from s2clientprotocol import debug_pb2
  from s2clientprotocol import error_pb2
  from s2clientprotocol import raw_pb2
  from s2clientprotocol import sc2api_pb2
label_desc: Use image node_id 1 for calling the GameReplayTestCase obj's underlying member method code with example usage: obj.setup() and returns: decorator, _setup