
"""Tests for open_spiel.python.referee."""
import os

import pyspiel
from absl.testing import absltest


class RefereeTest(absltest.TestCase):
    def test_playing_tournament(self):
        base = os.path.dirname(__file__) + "/../../higc/bots"
        ref = pyspiel.Referee("kuhn_poker",
                              [f"{base}/random_bot_py.sh",
                               f"{base}/random_bot_cpp.sh"])
        results = ref.play_tournament(num_matches=1)
        self.assertEqual(len(results.matches), 1)


if __name__ == "__main__":
    absltest.main()


"""Tests for open_spiel.python.referee."""
import os

import pyspiel
from absl.testing import absltest


class RefereeTest(absltest.TestCase):
    def test_playing_tournament(self):
        base = os.path.dirname(__file__) + "/../../higc/bots"
        ref = pyspiel.Referee(
            "kuhn_poker",
            [f"{base}/random_bot_py.sh", f"{base}/random_bot_cpp.sh"],
            settings=pyspiel.TournamentSettings(timeout_ready=2000,
                                                timeout_start=2000)
        )
        results = ref.play_tournament(num_matches=1)
        self.assertEqual(len(results.matches), 1)


if __name__ == "__main__":
    absltest.main()

Increase timeouts for the python test.
Increase timeouts for the python test.

  
  """Tests for open_spiel.python.referee."""
  import os
  
  import pyspiel
  from absl.testing import absltest
  
  
  class RefereeTest(absltest.TestCase):
      def test_playing_tournament(self):
          base = os.path.dirname(__file__) + "/../../higc/bots"
-         ref = pyspiel.Referee("kuhn_poker",
+         ref = pyspiel.Referee(
-                               [f"{base}/random_bot_py.sh",
-                                f"{base}/random_bot_cpp.sh"])
+             "kuhn_poker",
+             [f"{base}/random_bot_py.sh", f"{base}/random_bot_cpp.sh"],
+             settings=pyspiel.TournamentSettings(timeout_ready=2000,
+                                                 timeout_start=2000)
+         )
          results = ref.play_tournament(num_matches=1)
          self.assertEqual(len(results.matches), 1)
  
  
  if __name__ == "__main__":
      absltest.main()
  
Increase timeouts for the python test.
## Code Before:

"""Tests for open_spiel.python.referee."""
import os

import pyspiel
from absl.testing import absltest


class RefereeTest(absltest.TestCase):
    def test_playing_tournament(self):
        base = os.path.dirname(__file__) + "/../../higc/bots"
        ref = pyspiel.Referee("kuhn_poker",
                              [f"{base}/random_bot_py.sh",
                               f"{base}/random_bot_cpp.sh"])
        results = ref.play_tournament(num_matches=1)
        self.assertEqual(len(results.matches), 1)


if __name__ == "__main__":
    absltest.main()

## Instruction:
Increase timeouts for the python test.
## Code After:

"""Tests for open_spiel.python.referee."""
import os

import pyspiel
from absl.testing import absltest


class RefereeTest(absltest.TestCase):
    def test_playing_tournament(self):
        base = os.path.dirname(__file__) + "/../../higc/bots"
        ref = pyspiel.Referee(
            "kuhn_poker",
            [f"{base}/random_bot_py.sh", f"{base}/random_bot_cpp.sh"],
            settings=pyspiel.TournamentSettings(timeout_ready=2000,
                                                timeout_start=2000)
        )
        results = ref.play_tournament(num_matches=1)
        self.assertEqual(len(results.matches), 1)


if __name__ == "__main__":
    absltest.main()
