def testIfStringEnteredAsCo_ordinate(self): board, error = runTheThing("+++++++++","X","faceplant",0) assert error == "Co-ordinate was not in the correct format. Please enter an integer."
def testIfLost(self): board, error = runTheThing("x+xo+oxox","o",1,2) assert board.won == False
def testForInvalidMove(self): board, error = runTheThing("x++++++++","x",0,1) assert error == "Invalid move entered (There can only be one more X than the number of Os, and vice versa)."
def testForInvalidBoard(self): board, error = runTheThing("xx+++++++",None,None,None) assert error == "Invalid board entered (There can only be one more X than the number of Os, and vice versa)."
def testIfCo_ordinateOver2(self): board, error = runTheThing("+++++++++","x",1,4) assert error == "You have entered an invalid co-ordinate. They must all be 0, 1 or 2."
def testLetterInSamePlace(self): board, error = runTheThing("x++++++++","o",0,0) assert error == "There is already a letter in that position."
def testIfCo_ordinateLessThan0(self): board, error = runTheThing("+++++++++","x",-1,2) assert error == "You have entered an invalid co-ordinate. They must all be 0, 1 or 2."
def testIfWon(self): board, error = runTheThing("x+xo+oxox","o",1,1) assert board.won == True
def testIfInputNotXOOrHyphen(self): board, error = runTheThing("+++p+++++","x",1,2) assert error == "Input may only contain Xs, Os or +'s."
def testIfInputTooLong(self): board, error = runTheThing("+++++++++++","x",1,2) assert error == "Input must be nine characters long (X, O and + allowed)."
def testIfNotXOrO(self): board, error = runTheThing("+++++++++","p",1,2) assert error == "You must place either an X or an O."
def testIfCorrectInput(self): board, error = runTheThing("+++++++++","x",1,2) assert error == None
def testIfNoInput(self): board, error = runTheThing(None, None, None, None) assert error == "No board entered. Please enter one."