<commit_before>import unittest
from mock import MagicMock
from pytactoe.game_loop import GameLoop
from pytactoe.io import InputOutput
from cStringIO import StringIO

class GameLoopTests(unittest.TestCase):

    def setUp(self):
        self.player1 = MagicMock()
        self.player2 = MagicMock()

    def test_game_is_created_with_correct_players(self):
        io = InputOutput(StringIO(), StringIO())
        game_loop = GameLoop(io)
        game_loop.create_game(self.player1, self.player2)

        self.assertEqual(self.player1, game_loop.game.player1)
        self.assertEqual(self.player2, game_loop.game.player2)

    def test_evaluting_play_again_prompt(self):
        io = InputOutput(StringIO("c\nc\nyes\n"), StringIO())
        game_loop = GameLoop(io)
        game_loop.create_game(self.player1, self.player2)
        self.assertTrue(game_loop.play_again())<commit_msg>separates play_again test in GameLoop<commit_after>import unittest
from mock import MagicMock
from pytactoe.game_loop import GameLoop
from pytactoe.io import InputOutput
from cStringIO import StringIO

class GameLoopTests(unittest.TestCase):

    def setUp(self):
        self.player1 = MagicMock()
        self.player2 = MagicMock()

    def test_game_is_created_with_correct_players(self):
        io = InputOutput(StringIO(), StringIO())
        game_loop = GameLoop(io)
        game_loop.create_game(self.player1, self.player2)

        self.assertEqual(self.player1, game_loop.game.player1)
        self.assertEqual(self.player2, game_loop.game.player2)

    def test_evaluting_yes_response_to_play_again_prompt(self):
        io = InputOutput(StringIO("c\nc\nyes\n"), StringIO())
        game_loop = GameLoop(io)
        game_loop.create_game(self.player1, self.player2)
        self.assertTrue(game_loop.play_again())

    def test_evaluting_no_response_to_play_again_prompt(self):
        io = InputOutput(StringIO("c\nc\nno\n"), StringIO())
        game_loop = GameLoop(io)
        game_loop.create_game(self.player1, self.player2)
        self.assertFalse(game_loop.play_again())
{'fraction_non_alphanumeric': 0.09696092619392185, 'fraction_numerical': 0.010612638687891944, 'mean_word_length': 3.8457943925233646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3287178', 'n_tokens_mistral': 672, 'n_tokens_neox': 658, 'n_words': 111}