import unittest
import os

class MyTestCase(unittest.TestCase):

  def test_equal_output(self):
    expected = open("example.tab.reference.txt" , "rw+")
    output = open("example.tab.txt" , "rw+")
    
    self.assertEquals(len(expected.readlines()), len(output.readlines()))
    
if __name__ == '__main__':
    unittest.main()

@@ -12,18 +12,8 @@
 test
-%0Aimport os
 %0A%0Acl
@@ -122,32 +122,24 @@
 ference.txt%22
- , %22rw+%22
 )%0A    output
@@ -167,16 +167,8 @@
 txt%22
- , %22rw+%22
 )%0A  
@@ -190,17 +190,16 @@
 ertEqual
-s
 (len(exp
@@ -242,16 +242,57 @@
 ines()))
+%0A%0A    expected.close()%0A    output.close()
 %0A    %0Aif

fix syntax