"""
------------------------------------------------------------------------------
--                                                                          --
--                                 LAB 06                                   --
--                                                                          --
--                       L A B 0 6 _ T E S T S . P Y                        --
--                                                                          --
------------------------------------------------------------------------------
-- <Your Name Here>                                                         --
--                                                                          --
-- CISC106 011 Spring 2013                                                  --
--                                                                          --
------------------------------------------------------------------------------
-- This file contains unit tests for the functions in module lab06.         --
--                                                                          --
------------------------------------------------------------------------------
"""

from lab06 import *
import unittest

class TestLabThre(unittest.TestCase):
    def test_read_list(self):
        self.assertEqual(
                read_list('lab06ReadTest.txt'),
                ['a', 'b', 'c', 'd', 'e'])

    def test_write_list(self):
        write_list(['a', 'b', 'c', 'd', 'e'], 'lab06WriteTest.txt')
        in_file = open('lab06WriteTest.txt', 'r')
        self.assertEqual(in_file.read(), 'a\nb\nc\nd\ne\n')

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