Example #1
0
 def test_open_fd(self):
     with open(self.filename) as g:
         try:
             f = clover.open_file(g)
             self.assertIs(f, g)
         finally:
             f.close()
Example #2
0
 def assertOpenFileOK(self, filename):
     try:
         with open(filename) as g:
             f = clover.open_file(filename)
             self.assertEqual(f.read(), g.read())
     finally:
         f.close()
Example #3
0
 def test_open_fd(self):
     with open(self.filename) as g:
         try:
             f = clover.open_file(g)
             self.assertIs(f, g)
         finally:
             f.close()
Example #4
0
 def assertOpenFileOK(self, filename):
     try:
         with open(filename) as g:
             f = clover.open_file(filename)
             self.assertEqual(f.read(), g.read())
     finally:
         f.close()
Example #5
0
 def test_open_stdin(self):
     try:
         f = clover.open_file(sys.stdin)
         self.assertIs(f, sys.stdin)
     finally:
         f.close()
Example #6
0
 def test_open_stdin(self):
     try:
         f = clover.open_file(sys.stdin)
         self.assertIs(f, sys.stdin)
     finally:
         f.close()