"""
------------------------------------------------------------------------------
--                                                                          --
--                             FINAL PROJECT                                --
--                                                                          --
--                     P A C K I N G _ T E S T S . P Y                      --
--                                                                          --
------------------------------------------------------------------------------
-- <Your Name Here>                                                         --
--                                                                          --
-- <Class Name Here>                                                        --
--                                                                          --
------------------------------------------------------------------------------
-- This file contains some examples of unit tests for the final project.    --
-- NB that these are no where near adequate test coverage, they are just    --
-- samples of some of the things you will want to test.                     --
--                                                                          --
------------------------------------------------------------------------------
"""

from packing import *
import unittest

class TestPacking(unittest.TestCase):
    def test_fit(self):
        self.assertEqual(
            fit(create_board(1,4,[]), 0, 0, get_shape('I')), 
            (True, 0))
        self.assertEqual(
            fit(create_board(2,3,[[True,True,False],[False,False,False]]), 0, 0, get_shape('L')),
            (True, 2))

    def test_find_one_place(self):
        self.assertEqual(
            find_one_place(create_board(2,3,[]), get_shape('L')),
            (True, 0,0,0))
        self.assertEqual(
            find_one_place(create_board(2,4,[[True,False,False,False],[False,False,False,False]]), get_shape('L')),
            (True, 0,0,1))

    def test_find_best_place(self):
        self.assertEqual(find_best_place(create_board(3,4,[]), get_shape('L')), (True, 1,1,0))

if __name__ == '__main__':
    unittest.main()
