示例#1
0
    def test_initFieldSizeFive(self):

        field = snake.initField(numRows=5, numCols=5)

        fieldTest = [['#', '#', '#', '#', '#'], ['#', '', '', '', '#'],
                     ['#', '', '', '', '#'], ['#', '', '', '', '#'],
                     ['#', '#', '#', '#', '#']]
        assert fieldTest == field
示例#2
0
    def test_initFieldSizeTwenty(self):

        field = snake.initField(numRows=20)

        assert len(field) == 20
示例#3
0
    def test_initFieldSizeFive(self):

        field = snake.initField(numRows=5)

        assert len(field) == 5
示例#4
0
    def test_initFieldType(self):

        field = snake.initField()

        assert isinstance(field,list)
示例#5
0
    def test_initFieldSize(self):

        field = snake.initField()

        assert len(field) == 3
示例#6
0
    def test_initFieldSizeThree(self):

        field = snake.initField(numRows=3, numCols=3)

        fieldTest = [['#', '#', '#'], ['#', '', '#'], ['#', '#', '#']]
        assert fieldTest == field